Skip to content

Commit

Permalink
gre: Initialise rtnl_link tunnel parameters properly
Browse files Browse the repository at this point in the history
Brown paper bag error of calling memset with sizeof(p) instead
of sizeof(*p).

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
herbertx authored and davem330 committed Oct 11, 2008
1 parent f901b64 commit 7bb82d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ static int ipgre_tap_validate(struct nlattr *tb[], struct nlattr *data[])
static void ipgre_netlink_parms(struct nlattr *data[],
struct ip_tunnel_parm *parms)
{
memset(parms, 0, sizeof(parms));
memset(parms, 0, sizeof(*parms));

parms->iph.protocol = IPPROTO_GRE;

Expand Down

0 comments on commit 7bb82d9

Please sign in to comment.