From: David Woodhouse Date: Mon, 10 Jun 2019 21:35:26 +0000 (+0100) Subject: Revert "Set ESP Next Header field to 0x29 for IPv6 packets" X-Git-Tag: v8.04~26 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a6fe0d0d8088c49b65df7ae2ea1ee254ab34639a;p=users%2Fdwmw2%2Fopenconnect.git Revert "Set ESP Next Header field to 0x29 for IPv6 packets" This reverts commit 02ae906bb691c8b342d7ff0875e200ce55c18f2a. Turns out Pulse doesn't *accept* ESP frames with the correct Next-Header field for IPv6. You have to send 0x04 (IPIP). So I cleaned it up and removed the duplication for nothing... Might need to put this back when we work out how GPST does IPv6. Signed-off-by: David Woodhouse --- diff --git a/esp.c b/esp.c index fd6cf2bb..1f276b05 100644 --- a/esp.c +++ b/esp.c @@ -110,10 +110,7 @@ int construct_esp_packet(struct openconnect_info *vpninfo, struct pkt *pkt) for (i=0; idata[pkt->len + i] = i + 1; pkt->data[pkt->len + padlen] = padlen; - if ((pkt->data[0] & 0xf0) == 0x60) /* iph->ip_v */ - pkt->data[pkt->len + padlen + 1] = 0x29; /* IPv6 */ - else - pkt->data[pkt->len + padlen + 1] = 0x04; /* Legacy IP */ + pkt->data[pkt->len + padlen + 1] = 0x04; /* Legacy IP */ memcpy(pkt->esp.iv, vpninfo->esp_out.iv, sizeof(pkt->esp.iv));