diff options
author | Susant Sahani <susant@redhat.com> | 2015-03-05 22:02:47 +0530 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-04-20 20:09:32 +0200 |
commit | cffacc741cb79f63999720525ceaa65aae01a542 (patch) | |
tree | 33e89a2db842b883e5981ca33529aaa06d0d66df /src/network/networkd-netdev-vxlan.c | |
parent | bf23b9f86f6807c3029a6a46e1999ae0c87ca22a (diff) |
networkd vxlan: Add support for enabling UDP checksums
Add UDPCheckSum option to enable transmitting UDP checksums when doing
VXLAN/IPv4. Add UDP6ZeroChecksumRx, and UDP6ZeroChecksumTx
options to enable sending zero checksums and receiving zero
checksums in VXLAN/IPv6
[tomegun: rebase manpage due to whitespace changes]
Diffstat (limited to 'src/network/networkd-netdev-vxlan.c')
-rw-r--r-- | src/network/networkd-netdev-vxlan.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/network/networkd-netdev-vxlan.c b/src/network/networkd-netdev-vxlan.c index 4a3a51104f..e2c2b108b9 100644 --- a/src/network/networkd-netdev-vxlan.c +++ b/src/network/networkd-netdev-vxlan.c @@ -133,6 +133,30 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_ } } + r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_UDP_CSUM, v->udpcsum); + if (r < 0) { + log_netdev_error(netdev, + "Could not append IFLA_VXLAN_UDP_CSUM attribute: %s", + strerror(-r)); + return r; + } + + r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_UDP_ZERO_CSUM6_TX, v->udp6zerocsumtx); + if (r < 0) { + log_netdev_error(netdev, + "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_TX attribute: %s", + strerror(-r)); + return r; + } + + r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_UDP_ZERO_CSUM6_RX, v->udp6zerocsumrx); + if (r < 0) { + log_netdev_error(netdev, + "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_RX attribute: %s", + strerror(-r)); + return r; + } + return r; } @@ -197,6 +221,9 @@ static void vxlan_init(NetDev *netdev) { v->id = VXLAN_VID_MAX + 1; v->learning = true; + v->udpcsum = false; + v->udp6zerocsumtx = false; + v->udp6zerocsumrx = false; } const NetDevVTable vxlan_vtable = { |