projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0008b5a
)
network: allow to configure nexthop with null address
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 3 Feb 2021 08:07:24 +0000
(17:07 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 17 Feb 2021 06:55:37 +0000
(15:55 +0900)
Closes #18446.
src/network/networkd-nexthop.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-nexthop.c
b/src/network/networkd-nexthop.c
index a05026db4066d3488afe77cf1d0b3c1cb055f746..fcbb25ba158147881297ed8740ab10010edc36db 100644
(file)
--- a/
src/network/networkd-nexthop.c
+++ b/
src/network/networkd-nexthop.c
@@
-440,8
+440,9
@@
static int nexthop_section_verify(NextHop *nh) {
if (section_is_invalid(nh->section))
return -EINVAL;
- if (in_addr_is_null(nh->family, &nh->gw) < 0)
- return -EINVAL;
+ if (nh->family == AF_UNSPEC)
+ /* When no Gateway= is specified, assume IPv4. */
+ nh->family = AF_INET;
return 0;
}