Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
IPSEC-GRE: fixes and API update to common types.
[vpp.git]
/
src
/
vnet
/
ipsec-gre
/
node.c
diff --git
a/src/vnet/ipsec-gre/node.c
b/src/vnet/ipsec-gre/node.c
index
9e1ab20
..
6a3aaa1
100644
(file)
--- a/
src/vnet/ipsec-gre/node.c
+++ b/
src/vnet/ipsec-gre/node.c
@@
-160,7
+160,7
@@
VLIB_NODE_FN (ipsec_gre_input_node) (vlib_main_t * vm,
protocol0 = clib_net_to_host_u16 (h0->protocol);
protocol1 = clib_net_to_host_u16 (h1->protocol);
protocol0 = clib_net_to_host_u16 (h0->protocol);
protocol1 = clib_net_to_host_u16 (h1->protocol);
- if (PREDICT_TRUE(protocol0 ==
0x0001
))
+ if (PREDICT_TRUE(protocol0 ==
GRE_PROTOCOL_teb
))
{
next0 = IPSEC_GRE_INPUT_NEXT_L2_INPUT;
b0->error = node->errors[IPSEC_GRE_ERROR_NONE];
{
next0 = IPSEC_GRE_INPUT_NEXT_L2_INPUT;
b0->error = node->errors[IPSEC_GRE_ERROR_NONE];
@@
-170,7
+170,7
@@
VLIB_NODE_FN (ipsec_gre_input_node) (vlib_main_t * vm,
b0->error = node->errors[IPSEC_GRE_ERROR_UNKNOWN_PROTOCOL];
next0 = IPSEC_GRE_INPUT_NEXT_DROP;
}
b0->error = node->errors[IPSEC_GRE_ERROR_UNKNOWN_PROTOCOL];
next0 = IPSEC_GRE_INPUT_NEXT_DROP;
}
- if (PREDICT_TRUE(protocol1 ==
0x0001
))
+ if (PREDICT_TRUE(protocol1 ==
GRE_PROTOCOL_teb
))
{
next1 = IPSEC_GRE_INPUT_NEXT_L2_INPUT;
b1->error = node->errors[IPSEC_GRE_ERROR_NONE];
{
next1 = IPSEC_GRE_INPUT_NEXT_L2_INPUT;
b1->error = node->errors[IPSEC_GRE_ERROR_NONE];
@@
-314,7
+314,7
@@
drop1:
h0 = vlib_buffer_get_current (b0);
protocol0 = clib_net_to_host_u16 (h0->protocol);
h0 = vlib_buffer_get_current (b0);
protocol0 = clib_net_to_host_u16 (h0->protocol);
- if (PREDICT_TRUE(protocol0 ==
0x0001
))
+ if (PREDICT_TRUE(protocol0 ==
GRE_PROTOCOL_teb
))
{
next0 = IPSEC_GRE_INPUT_NEXT_L2_INPUT;
b0->error = node->errors[IPSEC_GRE_ERROR_NONE];
{
next0 = IPSEC_GRE_INPUT_NEXT_L2_INPUT;
b0->error = node->errors[IPSEC_GRE_ERROR_NONE];
@@
-332,7
+332,7
@@
drop1:
next0 = verr0 ? IPSEC_GRE_INPUT_NEXT_DROP : next0;
/* For L2 payload set input sw_if_index to GRE tunnel for learning */
next0 = verr0 ? IPSEC_GRE_INPUT_NEXT_DROP : next0;
/* For L2 payload set input sw_if_index to GRE tunnel for learning */
- if (PREDICT_
FALS
E(next0 == IPSEC_GRE_INPUT_NEXT_L2_INPUT))
+ if (PREDICT_
TRU
E(next0 == IPSEC_GRE_INPUT_NEXT_L2_INPUT))
{
u64 key = ((u64)(tun_dst0) << 32) | (u64)(tun_src0);
{
u64 key = ((u64)(tun_dst0) << 32) | (u64)(tun_src0);