Message ID | 20160612234814.15460-2-blair.steven@alliedtelesis.co.nz |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Blair Steven <blair.steven@alliedtelesis.co.nz> Date: Mon, 13 Jun 2016 11:48:14 +1200 > The offset for calculating ESN was not taking into account the new UDP > header created for NAT-T. All submissions must include a proper signoff.
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 4779374..c84d1fc 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -223,6 +223,8 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) uh->len = htons(skb->len - skb_transport_offset(skb)); uh->check = 0; + skb_set_transport_header(skb, skb_transport_offset(skb) + sizeof(struct udphdr)); + switch (encap_type) { default: case UDP_ENCAP_ESPINUDP: