summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFlorian Zumbiehl <florz@gmx.de>2007-03-04 16:03:22 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-05 13:25:28 -0800
commit6f30e1867cb73602c6ed7f97e15a48e0a0c96cde (patch)
tree4715c38e7555c42b92dbb8cf27afcde68a144cb8 /include
parentbc5f77434721a84705601e4d448d331c73900759 (diff)
downloadlinux-stable-6f30e1867cb73602c6ed7f97e15a48e0a0c96cde.tar.gz
linux-stable-6f30e1867cb73602c6ed7f97e15a48e0a0c96cde.tar.bz2
linux-stable-6f30e1867cb73602c6ed7f97e15a48e0a0c96cde.zip
[PPPOE]: Use ifindex instead of device pointer in key lookups.
Otherwise we can potentially try to dereference a NULL device pointer in some cases. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_pppox.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 4fab3d0a4bce..e33ee763c052 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -114,6 +114,7 @@ struct pppoe_hdr {
#ifdef __KERNEL__
struct pppoe_opt {
struct net_device *dev; /* device associated with socket*/
+ int ifindex; /* ifindex of device associated with socket */
struct pppoe_addr pa; /* what this socket is bound to*/
struct sockaddr_pppox relay; /* what socket data will be
relayed to (PPPoE relaying) */
@@ -132,6 +133,7 @@ struct pppox_sock {
unsigned short num;
};
#define pppoe_dev proto.pppoe.dev
+#define pppoe_ifindex proto.pppoe.ifindex
#define pppoe_pa proto.pppoe.pa
#define pppoe_relay proto.pppoe.relay