ipv4: Handle RTA_GATEWAY set to 0
authorDavid Ahern <dsahern@gmail.com>
Wed, 10 Apr 2019 17:05:51 +0000 (10:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Apr 2019 19:39:25 +0000 (12:39 -0700)
commitd73f80f921fd323af8f35644fb9f3b129f465f66
treecb516f729ba9fa16931f42d537381f77ef2aed3a
parent44b9b6ca251c0dabb9013339c4fef7f1f57be37a
ipv4: Handle RTA_GATEWAY set to 0

Govindarajulu reported a regression with Network Manager which sends an
RTA_GATEWAY attribute with the address set to 0. Fixup the handling of
RTA_GATEWAY to only set fc_gw_family if the gateway address is actually
set.

Fixes: f35b794b3b405 ("ipv4: Prepare fib_config for IPv6 gateway")
Reported-by: Govindarajulu Varadarajan <govind.varadar@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_frontend.c
net/ipv4/fib_semantics.c