| @@ -346,6 +346,7 @@ static int ipv4_tun_from_nlattr(const struct nlattr *attr, · 345 unmodified lines |
| 346 | [OVS_TUNNEL_KEY_ATTR_TTL] = 1, | 346 | [OVS_TUNNEL_KEY_ATTR_TTL] = 1, |
| 347 | [OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT] = 0, | 347 | [OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT] = 0, |
| 348 | [OVS_TUNNEL_KEY_ATTR_CSUM] = 0, | 348 | [OVS_TUNNEL_KEY_ATTR_CSUM] = 0, |
| | 349 | [OVS_TUNNEL_KEY_ATTR_OAM] = 0, |
| 349 | }; | 350 | }; |
| 350 | | 351 | |
| 351 | if (type > OVS_TUNNEL_KEY_ATTR_MAX) { | 352 | if (type > OVS_TUNNEL_KEY_ATTR_MAX) { |
| @@ -390,6 +391,9 @@ static int ipv4_tun_from_nlattr(const struct nlattr *attr, · 38 unmodified lines |
| 390 | case OVS_TUNNEL_KEY_ATTR_CSUM: | 391 | case OVS_TUNNEL_KEY_ATTR_CSUM: |
| 391 | tun_flags |= TUNNEL_CSUM; | 392 | tun_flags |= TUNNEL_CSUM; |
| 392 | break; | 393 | break; |
| | 394 | case OVS_TUNNEL_KEY_ATTR_OAM: |
| | 395 | tun_flags |= TUNNEL_OAM; |
| | 396 | break; |
| 393 | default: | 397 | default: |
| 394 | return -EINVAL; | 398 | return -EINVAL; |
| 395 | } | 399 | } |
| @@ -431,21 +435,24 @@ static int ipv4_tun_to_nlattr(struct sk_buff *skb, · 35 unmodified lines |
| 431 | nla_put_be64(skb, OVS_TUNNEL_KEY_ATTR_ID, output->tun_id)) | 435 | nla_put_be64(skb, OVS_TUNNEL_KEY_ATTR_ID, output->tun_id)) |
| 432 | return -EMSGSIZE; | 436 | return -EMSGSIZE; |
| 433 | if (output->ipv4_src && | 437 | if (output->ipv4_src && |
| 434 | nla_put_be32(skb, OVS_TUNNEL_KEY_ATTR_IPV4_SRC, output->ipv4_src)) | 438 | nla_put_be32(skb, OVS_TUNNEL_KEY_ATTR_IPV4_SRC, output->ipv4_src)) |
| 435 | return -EMSGSIZE; | 439 | return -EMSGSIZE; |
| 436 | if (output->ipv4_dst && | 440 | if (output->ipv4_dst && |
| 437 | nla_put_be32(skb, OVS_TUNNEL_KEY_ATTR_IPV4_DST, output->ipv4_dst)) | 441 | nla_put_be32(skb, OVS_TUNNEL_KEY_ATTR_IPV4_DST, output->ipv4_dst)) |
| 438 | return -EMSGSIZE; | 442 | return -EMSGSIZE; |
| 439 | if (output->ipv4_tos && | 443 | if (output->ipv4_tos && |
| 440 | nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TOS, output->ipv4_tos)) | 444 | nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TOS, output->ipv4_tos)) |
| 441 | return -EMSGSIZE; | 445 | return -EMSGSIZE; |
| 442 | if (nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TTL, output->ipv4_ttl)) | 446 | if (nla_put_u8(skb, OVS_TUNNEL_KEY_ATTR_TTL, output->ipv4_ttl)) |
| 443 | return -EMSGSIZE; | 447 | return -EMSGSIZE; |
| 444 | if ((output->tun_flags & TUNNEL_DONT_FRAGMENT) && | 448 | if ((output->tun_flags & TUNNEL_DONT_FRAGMENT) && |
| 445 | nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT)) | 449 | nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT)) |
| 446 | return -EMSGSIZE; | 450 | return -EMSGSIZE; |
| 447 | if ((output->tun_flags & TUNNEL_CSUM) && | 451 | if ((output->tun_flags & TUNNEL_CSUM) && |
| 448 | nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_CSUM)) | 452 | nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_CSUM)) |
| | 453 | return -EMSGSIZE; |
| | 454 | if ((output->tun_flags & TUNNEL_OAM) && |
| | 455 | nla_put_flag(skb, OVS_TUNNEL_KEY_ATTR_OAM)) |
| 449 | return -EMSGSIZE; | 456 | return -EMSGSIZE; |
| 450 | | 457 | |
| 451 | nla_nest_end(skb, nla); | 458 | nla_nest_end(skb, nla); |