diff options
Diffstat (limited to 'src/vnet/ip')
-rw-r--r-- | src/vnet/ip/ip.h | 3 | ||||
-rw-r--r-- | src/vnet/ip/ip6_packet.h | 1 | ||||
-rw-r--r-- | src/vnet/ip/lookup.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/ip/ip.h b/src/vnet/ip/ip.h index 747b4385816..50965d411e6 100644 --- a/src/vnet/ip/ip.h +++ b/src/vnet/ip/ip.h @@ -65,6 +65,9 @@ #include <vnet/ip/icmp6.h> #include <vnet/classify/vnet_classify.h> +#define u8_ptr_add(ptr, index) (((u8 *)ptr) + index) +#define u16_net_add(u, val) clib_host_to_net_u16(clib_net_to_host_u16(u) + (val)) + /* Per protocol info. */ typedef struct { diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h index 9916f3000cb..70c3dab473d 100644 --- a/src/vnet/ip/ip6_packet.h +++ b/src/vnet/ip/ip6_packet.h @@ -360,6 +360,7 @@ ip6_set_traffic_class_network_order (ip6_header_t * ip6, u8 dscp) { u32 tmp = clib_net_to_host_u32 (ip6->ip_version_traffic_class_and_flow_label); + tmp &= 0xf00fffff; tmp |= (dscp << 20); ip6->ip_version_traffic_class_and_flow_label = clib_host_to_net_u32 (tmp); } diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index 256000a2242..3bbf2abd8dc 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -322,7 +322,7 @@ const ip46_address_t zero_addr = { 0, 0}, }; -clib_error_t * +static clib_error_t * vnet_ip_route_cmd (vlib_main_t * vm, unformat_input_t * main_input, vlib_cli_command_t * cmd) { |