diff options
| -rw-r--r-- | net/core/rtnetlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 48f61885fd6f..5ea1bed08ede 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
| @@ -4104,6 +4104,11 @@ static int rtnl_fdb_get(struct sk_buff *in_skb, struct nlmsghdr *nlh, | |||
| 4104 | if (err < 0) | 4104 | if (err < 0) |
| 4105 | return err; | 4105 | return err; |
| 4106 | 4106 | ||
| 4107 | if (!addr) { | ||
| 4108 | NL_SET_ERR_MSG(extack, "Missing lookup address for fdb get request"); | ||
| 4109 | return -EINVAL; | ||
| 4110 | } | ||
| 4111 | |||
| 4107 | if (brport_idx) { | 4112 | if (brport_idx) { |
| 4108 | dev = __dev_get_by_index(net, brport_idx); | 4113 | dev = __dev_get_by_index(net, brport_idx); |
| 4109 | if (!dev) { | 4114 | if (!dev) { |
