Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
c11 safe string handling support
[vpp.git]
/
src
/
vnet
/
ip
/
ip4_forward.c
diff --git
a/src/vnet/ip/ip4_forward.c
b/src/vnet/ip/ip4_forward.c
index
3cd6d3b
..
192f301
100644
(file)
--- a/
src/vnet/ip/ip4_forward.c
+++ b/
src/vnet/ip/ip4_forward.c
@@
-753,13
+753,13
@@
VNET_FEATURE_INIT (ip4_policer_classify, static) =
{
.arc_name = "ip4-unicast",
.node_name = "ip4-policer-classify",
{
.arc_name = "ip4-unicast",
.node_name = "ip4-policer-classify",
- .runs_before = VNET_FEATURES ("ipsec
-input-ip4
"),
+ .runs_before = VNET_FEATURES ("ipsec
4-input
"),
};
VNET_FEATURE_INIT (ip4_ipsec, static) =
{
.arc_name = "ip4-unicast",
};
VNET_FEATURE_INIT (ip4_ipsec, static) =
{
.arc_name = "ip4-unicast",
- .node_name = "ipsec
-input-ip4
",
+ .node_name = "ipsec
4-input
",
.runs_before = VNET_FEATURES ("vpath-input-ip4"),
};
.runs_before = VNET_FEATURES ("vpath-input-ip4"),
};
@@
-839,13
+839,13
@@
VNET_FEATURE_INIT (ip4_outacl, static) =
{
.arc_name = "ip4-output",
.node_name = "ip4-outacl",
{
.arc_name = "ip4-output",
.node_name = "ip4-outacl",
- .runs_before = VNET_FEATURES ("ipsec
-output-ip4
"),
+ .runs_before = VNET_FEATURES ("ipsec
4-output
"),
};
VNET_FEATURE_INIT (ip4_ipsec_output, static) =
{
.arc_name = "ip4-output",
};
VNET_FEATURE_INIT (ip4_ipsec_output, static) =
{
.arc_name = "ip4-output",
- .node_name = "ipsec
-output-ip4
",
+ .node_name = "ipsec
4-output
",
.runs_before = VNET_FEATURES ("interface-output"),
};
.runs_before = VNET_FEATURES ("interface-output"),
};
@@
-943,11
+943,11
@@
ip4_lookup_init (vlib_main_t * vm)
{
ethernet_arp_header_t h;
{
ethernet_arp_header_t h;
- memset (&h, 0, sizeof (h));
+
clib_
memset (&h, 0, sizeof (h));
/* Set target ethernet address to all zeros. */
/* Set target ethernet address to all zeros. */
- memset (h.ip4_over_ethernet[1].ethernet, 0,
- sizeof (h.ip4_over_ethernet[1].ethernet));
+
clib_
memset (h.ip4_over_ethernet[1].ethernet, 0,
+
sizeof (h.ip4_over_ethernet[1].ethernet));
#define _16(f,v) h.f = clib_host_to_net_u16 (v);
#define _8(f,v) h.f = v;
#define _16(f,v) h.f = clib_host_to_net_u16 (v);
#define _8(f,v) h.f = v;
@@
-1485,6
+1485,7
@@
enum ip_local_packet_type_e
{
IP_LOCAL_PACKET_TYPE_L4,
IP_LOCAL_PACKET_TYPE_NAT,
{
IP_LOCAL_PACKET_TYPE_L4,
IP_LOCAL_PACKET_TYPE_NAT,
+ IP_LOCAL_PACKET_TYPE_FRAG,
};
/**
};
/**
@@
-1498,6
+1499,11
@@
ip4_local_classify (vlib_buffer_t * b, ip4_header_t * ip, u16 * next)
{
ip_lookup_main_t *lm = &ip4_main.lookup_main;
{
ip_lookup_main_t *lm = &ip4_main.lookup_main;
+ if (PREDICT_FALSE (ip4_is_fragment (ip)))
+ {
+ *next = IP_LOCAL_NEXT_REASSEMBLY;
+ return IP_LOCAL_PACKET_TYPE_FRAG;
+ }
if (PREDICT_FALSE (b->flags & VNET_BUFFER_F_IS_NATED))
{
*next = lm->local_next_by_ip_protocol[ip->protocol];
if (PREDICT_FALSE (b->flags & VNET_BUFFER_F_IS_NATED))
{
*next = lm->local_next_by_ip_protocol[ip->protocol];
@@
-1644,6
+1650,7
@@
VLIB_REGISTER_NODE (ip4_local_node) =
[IP_LOCAL_NEXT_PUNT] = "ip4-punt",
[IP_LOCAL_NEXT_UDP_LOOKUP] = "ip4-udp-lookup",
[IP_LOCAL_NEXT_ICMP] = "ip4-icmp-input",
[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-reassembly",
},
};
/* *INDENT-ON* */
},
};
/* *INDENT-ON* */