[PATCH nf-next,v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Cong Wang xiyou.wangcong at gmail.com
Wed May 11 05:24:56 UTC 2016


On Sun, May 8, 2016 at 3:55 PM, Pablo Neira Ayuso <pablo at netfilter.org> wrote:
> +static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info)
> +{
...
> +
> +       net = gtp_genl_get_net(sock_net(skb->sk), info->attrs);
> +       if (IS_ERR(net))
> +               return PTR_ERR(net);
> +
> +       /* Check if there's an existing gtpX device to configure */
> +       dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK]));
> +       if (dev == NULL)
> +               return -ENODEV;
> +
> +       return ipv4_pdp_add(dev, info);


Seems you are leaking struct net at least in the error path.



More information about the OpenBSC mailing list