Skip to content

Commit

Permalink
l2tp: unmanaged L2TPv3 tunnels fixes
Browse files Browse the repository at this point in the history
Followup to commit 789a4a2 
(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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Apr 4, 2010
1 parent 486f50c commit 7bddd0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/l2tp/l2tp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ static int l2tp_tunnel_sock_create(u32 tunnel_id, u32 peer_tunnel_id, struct l2t
int err = -EINVAL;
struct sockaddr_in udp_addr;
struct sockaddr_l2tpip ip_addr;
struct socket *sock;
struct socket *sock = NULL;

switch (cfg->encap) {
case L2TP_ENCAPTYPE_UDP:
Expand Down
2 changes: 1 addition & 1 deletion net/l2tp/l2tp_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct l2tp_tunnel_cfg {
struct in_addr peer_ip;
u16 local_udp_port;
u16 peer_udp_port;
int use_udp_checksums:1;
unsigned int use_udp_checksums:1;
};

struct l2tp_tunnel {
Expand Down

0 comments on commit 7bddd0d

Please sign in to comment.