[ovs-dev] [PATCH] netdev-vport: Warn about invalid TOS.
Pravin Shelar
pshelar at nicira.com
Fri Jul 20 18:09:00 UTC 2012
Looks good.
Thanks.
On Fri, Jul 20, 2012 at 10:25 AM, Ben Pfaff <blp at nicira.com> wrote:
> Otherwise the kernel will reject it later and the result is no tunnel,
> whereas a tunnel with an unexpected TOS seems like a better result.
>
> Bug #12566.
> Reported-by: Luca Giraudo <lgiraudo at nicira.com>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
> lib/netdev-vport.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
> index 836069f..db5c3db 100644
> --- a/lib/netdev-vport.c
> +++ b/lib/netdev-vport.c
> @@ -614,8 +614,10 @@ parse_tunnel_config(const char *name, const char *type,
> char *endptr;
> int tos;
> tos = strtol(node->value, &endptr, 0);
> - if (*endptr == '\0') {
> + if (*endptr == '\0' && tos == (tos & IP_DSCP_MASK)) {
> nl_msg_put_u8(options, OVS_TUNNEL_ATTR_TOS, tos);
> + } else {
> + VLOG_WARN("%s: invalid TOS %s", name, node->value);
> }
> }
> } else if (!strcmp(node->key, "ttl")) {
> --
> 1.7.2.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list