PERFORCE change 114235 for review
Paolo Pisati
piso at FreeBSD.org
Thu Feb 8 11:59:05 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=114235
Change 114235 by piso at piso_newluxor on 2007/02/08 11:58:25
When pulling up the tcp hdr, pull up the options too.
Affected files ...
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#25 edit
Differences ...
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#25 (text+ko) ====
@@ -198,8 +198,15 @@
} while (0)
#define PULLUP_TCPHDR(pip, ptr) do { \
+ struct tcphdr *th; \
pip = mtod(*ptr, struct ip *); \
PULLUP_SIZE(pip, ptr, (pip->ip_hl << 2) + sizeof(struct tcphdr)); \
+ if (pip != NULL) { \
+ th = (struct tcphdr *)&(((char *)pip)[pip->ip_hl << 2]); \
+ if ((th->th_off << 2) > sizeof(struct tcphdr)) \
+ PULLUP_SIZE(pip, ptr, ((pip->ip_hl + th->th_off) << \
+ 2)); \
+ } \
} while (0)
#define PULLUP_ICMPHDR(pip, ptr) do { \
More information about the p4-projects
mailing list