ip: remove hotwired udp-lookup next node 40/43840/4
authorMaxime Peim <[email protected]>
Mon, 6 Oct 2025 13:00:52 +0000 (15:00 +0200)
committerFlorin Coras <[email protected]>
Wed, 8 Oct 2025 17:40:36 +0000 (17:40 +0000)
udp-lookup nodes can be registered as any other nodes.

Type: refactor
Change-Id: I556f9cd1128c4d5d7b7c7ac11642f34bc89fd37f
Signed-off-by: Maxime Peim <[email protected]>
src/vnet/ip/ip4_forward.c
src/vnet/ip/ip6_forward.c
src/vnet/ip/lookup.c
src/vnet/ip/lookup.h
src/vnet/udp/udp_local.c

index fb96159..711455c 100644 (file)
@@ -1880,7 +1880,6 @@ VLIB_REGISTER_NODE (ip4_local_node) =
   {
     [IP_LOCAL_NEXT_DROP] = "ip4-drop",
     [IP_LOCAL_NEXT_PUNT] = "ip4-punt",
-    [IP_LOCAL_NEXT_UDP_LOOKUP] = "ip4-udp-lookup",
     [IP_LOCAL_NEXT_ICMP] = "ip4-icmp-input",
     [IP_LOCAL_NEXT_REASSEMBLY] = "ip4-local-full-reassembly",
   },
index 1a77bd7..668dcd4 100644 (file)
@@ -1666,7 +1666,6 @@ VLIB_REGISTER_NODE (ip6_local_node) =
   {
     [IP_LOCAL_NEXT_DROP] = "ip6-drop",
     [IP_LOCAL_NEXT_PUNT] = "ip6-punt",
-    [IP_LOCAL_NEXT_UDP_LOOKUP] = "ip6-udp-lookup",
     [IP_LOCAL_NEXT_ICMP] = "ip6-icmp-input",
     [IP_LOCAL_NEXT_REASSEMBLY] = "ip6-local-full-reassembly",
   },
index b978bd7..664d01b 100644 (file)
@@ -103,7 +103,6 @@ ip_lookup_init (ip_lookup_main_t * lm, u32 is_ip6)
        lm->builtin_protocol_by_ip_protocol[i] = IP_BUILTIN_PROTOCOL_UNKNOWN;
       }
 
-    lm->local_next_by_ip_protocol[IP_PROTOCOL_UDP] = IP_LOCAL_NEXT_UDP_LOOKUP;
     lm->local_next_by_ip_protocol[is_ip6 ? IP_PROTOCOL_ICMP6 :
                                  IP_PROTOCOL_ICMP] = IP_LOCAL_NEXT_ICMP;
     lm->builtin_protocol_by_ip_protocol[IP_PROTOCOL_UDP] =
index 8083d97..f2ca3cc 100644 (file)
@@ -110,7 +110,6 @@ typedef enum
 {
   IP_LOCAL_NEXT_DROP,
   IP_LOCAL_NEXT_PUNT,
-  IP_LOCAL_NEXT_UDP_LOOKUP,
   IP_LOCAL_NEXT_ICMP,
   IP_LOCAL_NEXT_REASSEMBLY,
   IP_LOCAL_N_NEXT,
index 6531b73..cd42730 100644 (file)
@@ -622,8 +622,8 @@ udp_local_init (vlib_main_t * vm)
 #define _(n,s) udp_add_dst_port (um, UDP_DST_PORT_##s, #s, 0 /* is_ip4 */);
     foreach_udp6_dst_port
 #undef _
-    ip4_register_protocol (IP_PROTOCOL_UDP, udp4_local_node.index);
-  /* Note: ip6 differs from ip4, UDP is hotwired to ip6-udp-lookup */
+      ip4_register_protocol (IP_PROTOCOL_UDP, udp4_local_node.index);
+  ip6_register_protocol (IP_PROTOCOL_UDP, udp6_local_node.index);
   return 0;
 }