aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp
AgeCommit message (Expand)AuthorFilesLines
2019-03-29dhcp: only register UDP ports that are neededMatthew Smith3-12/+21
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra5-6/+6
2019-03-13deprecate VLIB_NODE_FUNCTION_MULTIARCHFilip Tehlar1-7/+3
2019-03-07parse ethernet header in ct6_in2outDave Barach1-7/+14
2019-03-04Fix 2x overconsumption of debug cli input bugsDave Barach2-9/+20
2019-02-25buffer chain linearizationKlement Sekera1-3/+10
2019-02-18DHCP: trace flags copied from old to new not vice-versaNeale Ranns2-2/+2
2019-02-09buffers: fix typoDamjan Marion1-1/+1
2019-02-06buffers: make buffer data size configurable from startup configDamjan Marion1-1/+1
2019-01-20buffers: don't init metadata, as it is already initializedDamjan Marion1-4/+1
2019-01-19buffers: remove free-list information from buffer metadataDamjan Marion1-3/+2
2018-11-29DHCP: Initialise trace for copied buffers.Ole Troan2-0/+4
2018-11-20dhcp4:(VPP-1483) linearize chained packets before handlingEyal Bari2-53/+54
2018-10-23dns, dhcp: on-demand udp port registrationDave Barach3-5/+33
2018-10-23c11 safe string handling supportDave Barach9-17/+17
2018-07-19Remove unused argument to vlib_feature_nextDamjan Marion1-10/+5
2018-07-10VPP-1337: Dangling reference be gone!Dave Barach3-0/+6
2018-06-21Implement DHCPv6 IA NA client (VPP-1094)Juraj Sloboda12-537/+2502
2018-06-15Update DHCPv6 DUID code and fix coverity warningsJuraj Sloboda5-39/+85
2018-06-08Implement DHCPv6 PD client (VPP-718, VPP-1050)Juraj Sloboda9-42/+3033
2018-06-07DHCP Client DumpNeale Ranns4-60/+231
2018-05-27VPP-1294: add missing feature arc constraintDave Barach2-5/+21
2018-05-10DHCP4 client process replies when renewing leaseMatthew Smith1-16/+24
2018-03-23Drop dhcp pkts w/ hardware address mismatchesDave Barach2-11/+40
2018-03-21VPP_1202: handle DHCP NAK packetsDave Barach2-1/+28
2018-03-06API: Add service definitions for events and singleton messages (second attempt)Marek Gradzki1-0/+4
2018-03-05Revert "API: Add service definitions for events and singleton messages."Ole Trøan1-4/+0
2018-03-05API: Add service definitions for events and singleton messages.Ole Troan1-0/+4
2018-02-14Reenable dhcp client detect when lease expiresDave Barach1-1/+50
2018-02-12Fix DHCP client crash with worker threadsMatthew Smith3-51/+56
2018-01-31Improved tracing for the IP[46] not-enabled case.Neale Ranns1-1/+1
2018-01-23For DHCP client configuration control the setting of the broadcast flag in theNeale Ranns5-100/+397
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
2018-01-11api: remove transport specific code from handlersFlorin Coras1-11/+11
2018-01-09api: refactor vlibmemoryFlorin Coras1-3/+3
2017-12-09VPP-249 Coding standards cleanup - vnet/vnet/dhcpkhemendra kumar8-2035/+2085
2017-11-16Add Support of DHCP VSS Type 0 where VPN-ID is ASCIIJohn Lo7-185/+241
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace1-1/+1
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
2017-09-20Fix DHCP client so it works for worker threadsJohn Lo1-2/+14
2017-09-11FIB table add/delete APINeale Ranns3-16/+21
2017-08-08L2 over MPLSNeale Ranns2-4/+4
2017-08-03DHCP Client: receive unicast ACKsNeale Ranns1-1/+78
2017-07-18DHCP client option 61 "client_id"Neale Ranns4-2/+19
2017-07-18DHCP client - remove interface address when DHCP de-configuredNeale Ranns1-0/+1
2017-07-14Introduce l{2,3,4}_hdr_offset fields in the buffer metadataDamjan Marion2-2/+2
2017-07-06DHCP complete event sends mask lengthNeale Ranns3-3/+7
2017-05-24IPv6 Performance bugsNeale Ranns1-4/+5
2017-04-28Fix hostname fencepost error in dhcp_compl_event_callback.Jon Loeliger1-2/+4
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach1-34/+4
"ow">in rx: self.fail() if IP in rx: self.fail() self.assertEqual(rx[IPv6].src, expected[IPv6].src) self.assertEqual(rx[IPv6].dst, expected[IPv6].dst) self.assertEqual(rx[IPv6].nh, expected[IPv6].nh) def payload(self, len): return 'x' * len def test_6rd_ip6_to_ip4(self): """ ip6 -> ip4 (encap) 6rd test """ p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) p_ip6 = IPv6(src="1::1", dst="2002:AC10:0202::1", nh='UDP') rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_payload = UDP(sport=1234, dport=1234) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg0.local_ip4, dst=self.pg1.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_6in4(p, p_reply) # MTU tests (default is 1480) plen = 1481 - 40 - 8 p_ip6 = IPv6(src="1::1", dst="2002:AC10:0202::1") p_payload = UDP(sport=1234, dport=1234) / Raw(self.payload(plen)) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg0.local_ip4, dst=self.pg1.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_assert_no_replies(self.pg0, p * 10) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip6_to_ip4_vrf(self): """ ip6 -> ip4 (encap) 6rd VRF test """ p_ether = Ether(src=self.pg2.remote_mac, dst=self.pg2.local_mac) p_ip6 = IPv6(src="1::1", dst="2002:AC10:0402::1", nh='UDP') rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=20, ip4_table_id=10, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg2.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_payload = UDP(sport=1234, dport=1234) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg2.local_ip4, dst=self.pg3.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_expect(self.pg2, p * 10, self.pg3) for p in rx: self.validate_6in4(p, p_reply) # MTU tests (default is 1480) plen = 1481 - 40 - 8 p_ip6 = IPv6(src="1::1", dst="2002:AC10:0402::1") p_payload = UDP(sport=1234, dport=1234) / Raw(self.payload(plen)) p = (p_ether / p_ip6 / p_payload) p_reply = (IP(src=self.pg2.local_ip4, dst=self.pg3.remote_ip4, proto='ipv6') / p_ip6) rx = self.send_and_assert_no_replies(self.pg0, p * 10) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6(self): """ ip4 -> ip6 (decap) 6rd test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index rv = self.vapi.ipip_6rd_del_tunnel(rv.sw_if_index) rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index p_ip6 = (IPv6(src="2002:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_reply) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6_vrf(self): """ ip4 -> ip6 (decap) 6rd VRF test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=20, ip4_table_id=10, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg2.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index rv = self.vapi.ipip_6rd_del_tunnel(rv.sw_if_index) rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=20, ip4_table_id=10, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg2.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.sw_interface_set_table(self.tunnel_index, 1, 20) p_ip6 = (IPv6(src="2002:AC10:0402::1", dst=self.pg3.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg2.remote_mac, dst=self.pg2.local_mac) / IP(src=self.pg3.remote_ip4, dst=self.pg2.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg2, p * 10, self.pg3) for p in rx: self.validate_4in6(p, p_reply) self.vapi.sw_interface_set_table(self.tunnel_index, 1, 0) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6_multiple(self): """ ip4 -> ip6 (decap) 6rd test """ self.tunnel_index = [] rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index.append(rv.sw_if_index) rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2003::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg1.local_ip4, security_check=True) self.tunnel_index.append(rv.sw_if_index) self.vapi.cli("show ip6 fib") p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) p_ip4 = IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) p_ip6_1 = (IPv6(src="2002:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p_ip6_2 = (IPv6(src="2003:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (p_ether / p_ip4 / p_ip6_1) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_ip6_1) p = (p_ether / p_ip4 / p_ip6_2) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_ip6_2) for i in self.tunnel_index: self.vapi.ipip_6rd_del_tunnel(i) def test_6rd_ip4_to_ip6_suffix(self): """ ip4 -> ip6 (decap) 6rd test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='172.0.0.0/8', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) p_ip4 = IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) p_ip6 = (IPv6(src="2002:1002:0200::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (p_ether / p_ip4 / p_ip6) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_ip6) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_ip4_to_ip6_sec_check(self): """ ip4 -> ip6 (decap) security check 6rd test """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=True) self.tunnel_index = rv.sw_if_index self.vapi.cli("show ip6 fib") p_ip6 = (IPv6(src="2002:AC10:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p_ip6_fail = (IPv6(src="2002:DEAD:0202::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_reply) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg1.remote_ip4, dst=self.pg0.local_ip4) / p_ip6_fail) rx = self.send_and_assert_no_replies(self.pg0, p * 10) self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) def test_6rd_bgp_tunnel(self): """ 6rd BGP tunnel """ rv = self.vapi.ipip_6rd_add_tunnel(ip6_table_id=0, ip4_table_id=0, ip6_prefix='2002::/16', ip4_prefix='0.0.0.0/0', ip4_src=self.pg0.local_ip4, security_check=False) self.tunnel_index = rv.sw_if_index default_route = VppIpRoute(self, "DEAD::", 16, [VppRoutePath("2002:0808:0808::", self.tunnel_index)]) default_route.add_vpp_config() ip4_route = VppIpRoute(self, "8.0.0.0", 8, [VppRoutePath(self.pg1.remote_ip4, 0xFFFFFFFF)]) ip4_route.add_vpp_config() # Via recursive route 6 -> 4 p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IPv6(src="1::1", dst="DEAD:BEEF::1") / UDP(sport=1234, dport=1234)) p_reply = (IP(src=self.pg0.local_ip4, dst="8.8.8.8", proto='ipv6') / IPv6(src='1::1', dst='DEAD:BEEF::1', nh='UDP')) rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_6in4(p, p_reply) # Via recursive route 4 -> 6 (Security check must be disabled) p_ip6 = (IPv6(src="DEAD:BEEF::1", dst=self.pg1.remote_ip6) / UDP(sport=1234, dport=1234)) p = (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src="8.8.8.8", dst=self.pg0.local_ip4) / p_ip6) p_reply = p_ip6 rx = self.send_and_expect(self.pg0, p * 10, self.pg1) for p in rx: self.validate_4in6(p, p_reply) ip4_route.remove_vpp_config() default_route.remove_vpp_config() self.vapi.ipip_6rd_del_tunnel(self.tunnel_index) if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)