]> git.baikalelectronics.ru Git - kernel.git/commit
wireguard: receive: use tunnel helpers for decapsulating ECN markings
authorToke Høiland-Jørgensen <toke@redhat.com>
Wed, 29 Apr 2020 20:59:22 +0000 (14:59 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2020 21:23:05 +0000 (14:23 -0700)
commit94494c8540c72b12fe56d5e17cfee4ea8fd3f839
tree21d3525bc0649801ca7996a2a51e31d7d668cae3
parent98f04733d84fd062e23e761751f42e9ca9cdace3
wireguard: receive: use tunnel helpers for decapsulating ECN markings

WireGuard currently only propagates ECN markings on tunnel decap according
to the old RFC3168 specification. However, the spec has since been updated
in RFC6040 to recommend slightly different decapsulation semantics. This
was implemented in the kernel as a set of common helpers for ECN
decapsulation, so let's just switch over WireGuard to using those, so it
can benefit from this enhancement and any future tweaks. We do not drop
packets with invalid ECN marking combinations, because WireGuard is
frequently used to work around broken ISPs, which could be doing that.

Fixes: 4dff5496e367 ("net: WireGuard secure network tunnel")
Reported-by: Olivier Tilmans <olivier.tilmans@nokia-bell-labs.com>
Cc: Dave Taht <dave.taht@gmail.com>
Cc: Rodney W. Grimes <ietf@gndrsh.dnsmgr.net>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireguard/receive.c