--- xl2tpd-1.3.16.orig/network.c +++ xl2tpd-1.3.16/network.c @@ -159,7 +159,8 @@ static inline void fix_hdr (void *buf) * Fix the byte order of the header */ - struct payload_hdr *p = (struct payload_hdr *) buf; + volatile struct payload_hdr *p = (struct payload_hdr *) buf; + _u16 ver = ntohs (p->ver); if (CTBIT (p->ver)) {