aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-04 04:02:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-04 04:02:46 -0400
commit7bddd0db6248d92adb1f547fd45507af4368d6fa (patch)
tree4f182b3e880f597f9ee4cb48189da6b4f19b8003 /net
parent486f50ca796a2572c42c34dd4378cdc8eeb0b137 (diff)
l2tp: unmanaged L2TPv3 tunnels fixes
Followup to commit 789a4a2c (l2tp: Add support for static unmanaged L2TPv3 tunnels) One missing init in l2tp_tunnel_sock_create() could access random kernel memory, and a bit field should be unsigned. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/l2tp/l2tp_core.c2
-rw-r--r--net/l2tp/l2tp_core.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 13ed85baf4e9..98dfcce1a5fc 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1227,7 +1227,7 @@ static int l2tp_tunnel_sock_create(u32 tunnel_id, u32 peer_tunnel_id, struct l2t
1227 int err = -EINVAL; 1227 int err = -EINVAL;
1228 struct sockaddr_in udp_addr; 1228 struct sockaddr_in udp_addr;
1229 struct sockaddr_l2tpip ip_addr; 1229 struct sockaddr_l2tpip ip_addr;
1230 struct socket *sock; 1230 struct socket *sock = NULL;
1231 1231
1232 switch (cfg->encap) { 1232 switch (cfg->encap) {
1233 case L2TP_ENCAPTYPE_UDP: 1233 case L2TP_ENCAPTYPE_UDP:
diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h
index 91b1b9ca5cfa..f0f318edd3f1 100644
--- a/net/l2tp/l2tp_core.h
+++ b/net/l2tp/l2tp_core.h
@@ -152,7 +152,7 @@ struct l2tp_tunnel_cfg {
152 struct in_addr peer_ip; 152 struct in_addr peer_ip;
153 u16 local_udp_port; 153 u16 local_udp_port;
154 u16 peer_udp_port; 154 u16 peer_udp_port;
155 int use_udp_checksums:1; 155 unsigned int use_udp_checksums:1;
156}; 156};
157 157
158struct l2tp_tunnel { 158struct l2tp_tunnel {