Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2007 11:58:50 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 114235 for review
Message-ID:  <200702081158.l18BwoDn081152@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114235

Change 114235 by piso@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 {           \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702081158.l18BwoDn081152>