rocker: Ignore address families other than IPv4
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 11:28:13 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:35:59 +0000 (15:35 -0700)
As in previous patch, ignore IPv6 notifications since the driver doesn't
support these.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker_main.c

index ef38c1a41bdd66d97e977c4bc37809e2ccbeae8d..fc8f8bdf657912b3a19423cc64670701c1e10f5c 100644 (file)
@@ -2192,6 +2192,10 @@ static int rocker_router_fib_event(struct notifier_block *nb,
 {
        struct rocker *rocker = container_of(nb, struct rocker, fib_nb);
        struct rocker_fib_event_work *fib_work;
+       struct fib_notifier_info *info = ptr;
+
+       if (info->family != AF_INET)
+               return NOTIFY_DONE;
 
        fib_work = kzalloc(sizeof(*fib_work), GFP_ATOMIC);
        if (WARN_ON(!fib_work))