diff options
author | Daniel Mack <github@zonque.org> | 2015-07-25 10:48:43 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-07-25 10:48:43 +0200 |
commit | 3460810e8c61986a4605ad80c9e4805eb95cb5a1 (patch) | |
tree | d819524ea1ee5d6bb92e0156eca418319476e0dd /src/network | |
parent | c11ae0bacee4ab835526a7408f619a754b3b848e (diff) | |
parent | 23da66bb402cc6d9bca2eb34e090ccc24dfbf3f5 (diff) |
Merge pull request #722 from keszybz/networkd-clarifications
Networkd clarifications
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-link.c | 4 | ||||
-rw-r--r-- | src/network/networkd-netdev-gperf.gperf | 2 | ||||
-rw-r--r-- | src/network/networkd-netdev-tunnel.c | 2 | ||||
-rw-r--r-- | src/network/networkd-netdev-tunnel.h | 2 | ||||
-rw-r--r-- | src/network/networkd-network-gperf.gperf | 4 | ||||
-rw-r--r-- | src/network/networkd-network.c | 4 | ||||
-rw-r--r-- | src/network/networkd.h | 4 |
7 files changed, 13 insertions, 9 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 55510b46e9..f20f68b482 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -858,7 +858,7 @@ static int link_set_bridge(Link *link) { if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_PROTINFO attribute: %m"); - r = sd_netlink_message_append_u8(req, IFLA_BRPORT_GUARD, link->network->bpdu_guard); + r = sd_netlink_message_append_u8(req, IFLA_BRPORT_GUARD, !link->network->use_bpdu); if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_BRPORT_GUARD attribute: %m"); @@ -870,7 +870,7 @@ static int link_set_bridge(Link *link) { if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_BRPORT_FAST_LEAVE attribute: %m"); - r = sd_netlink_message_append_u8(req, IFLA_BRPORT_PROTECT, link->network->root_block); + r = sd_netlink_message_append_u8(req, IFLA_BRPORT_PROTECT, !link->network->allow_port_to_be_root); if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_BRPORT_PROTECT attribute: %m"); diff --git a/src/network/networkd-netdev-gperf.gperf b/src/network/networkd-netdev-gperf.gperf index bdc43e87f6..be76022bc7 100644 --- a/src/network/networkd-netdev-gperf.gperf +++ b/src/network/networkd-netdev-gperf.gperf @@ -37,7 +37,7 @@ Tunnel.TTL, config_parse_unsigned, 0, Tunnel.DiscoverPathMTU, config_parse_bool, 0, offsetof(Tunnel, pmtudisc) Tunnel.Mode, config_parse_ip6tnl_mode, 0, offsetof(Tunnel, ip6tnl_mode) Tunnel.IPv6FlowLabel, config_parse_ipv6_flowlabel, 0, offsetof(Tunnel, ipv6_flowlabel) -Tunnel.DiffServiceCodePoint, config_parse_bool, 0, offsetof(Tunnel, dscp) +Tunnel.CopyDSCP, config_parse_bool, 0, offsetof(Tunnel, copy_dscp) Peer.Name, config_parse_ifname, 0, offsetof(Veth, ifname_peer) Peer.MACAddress, config_parse_hwaddr, 0, offsetof(Veth, mac_peer) VXLAN.Id, config_parse_uint64, 0, offsetof(VxLan, id) diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c index 1af234aba3..7fd9ef584b 100644 --- a/src/network/networkd-netdev-tunnel.c +++ b/src/network/networkd-netdev-tunnel.c @@ -281,7 +281,7 @@ static int netdev_ip6tnl_fill_message_create(NetDev *netdev, Link *link, sd_netl return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_FLOWINFO attribute: %m"); } - if (t->dscp) + if (t->copy_dscp) t->flags |= IP6_TNL_F_RCV_DSCP_COPY; r = sd_netlink_message_append_u32(m, IFLA_IPTUN_FLAGS, t->flags); diff --git a/src/network/networkd-netdev-tunnel.h b/src/network/networkd-netdev-tunnel.h index e08e2891e7..1fd2b94ae1 100644 --- a/src/network/networkd-netdev-tunnel.h +++ b/src/network/networkd-netdev-tunnel.h @@ -57,7 +57,7 @@ struct Tunnel { IPv6FlowLabel ipv6_flowlabel; bool pmtudisc; - bool dscp; + bool copy_dscp; }; extern const NetDevVTable ipip_vtable; diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 720f6b9d0b..83224d7109 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -73,10 +73,10 @@ DHCP.CriticalConnection, config_parse_bool, 0 DHCP.VendorClassIdentifier, config_parse_string, 0, offsetof(Network, dhcp_vendor_class_identifier) DHCP.RouteMetric, config_parse_unsigned, 0, offsetof(Network, dhcp_route_metric) Bridge.Cost, config_parse_unsigned, 0, offsetof(Network, cost) -Bridge.BPDUGuard, config_parse_bool, 0, offsetof(Network, bpdu_guard) +Bridge.UseBPDU, config_parse_bool, 0, offsetof(Network, use_bpdu) Bridge.HairPin, config_parse_bool, 0, offsetof(Network, hairpin) Bridge.FastLeave, config_parse_bool, 0, offsetof(Network, fast_leave) -Bridge.RootBlock, config_parse_bool, 0, offsetof(Network, root_block) +Bridge.AllowPortToBeRoot, config_parse_bool, 0, offsetof(Network, allow_port_to_be_root) Bridge.UnicastFlood, config_parse_bool, 0, offsetof(Network, unicast_flood) BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0 BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0 diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 55e735e6bf..d8f42621af 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -107,6 +107,10 @@ static int network_load_one(Manager *manager, const char *filename) { network->dhcp_route_metric = DHCP_ROUTE_METRIC; network->dhcp_client_identifier = DHCP_CLIENT_ID_DUID; + network->use_bpdu = true; + network->allow_port_to_be_root = true; + network->unicast_flood = true; + network->llmnr = LLMNR_SUPPORT_YES; network->link_local = ADDRESS_FAMILY_IPV6; diff --git a/src/network/networkd.h b/src/network/networkd.h index 6418c0a536..a285a4b08f 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -150,10 +150,10 @@ struct Network { bool dhcp_server; - bool bpdu_guard; + bool use_bpdu; bool hairpin; bool fast_leave; - bool root_block; + bool allow_port_to_be_root; bool unicast_flood; unsigned cost; |