Skip to content

Commit cbd50ad

Browse files
committed
networkd: reorder gperf fields
In eb64b43 ActiveSlave/PrimarySlave were inserted in between IPv6AcceptRA and IPv6AcceptRouterAdvertisements and the comment then didn't make sense. It turns out that gperf does not understand C-style comments, and that there's no comment syntax in the keywords section. The following was generated: {"/* legacy alias for the above */"}, {"Network.IPv6AcceptRA", config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)}, In practice this wouldn't lead to problems because this fake pattern would be hard to match, but it seems better to remove the comments altogether. Readers of the .gperf file will have to look for the repeated output field to notice legacy options. To make this easier, let's always keep the legacy option second.
1 parent c65aafb commit cbd50ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/network/networkd-network-gperf.gperf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@ Network.IPForward, config_parse_address_family_boolean_with
6060
Network.IPMasquerade, config_parse_bool, 0, offsetof(Network, ip_masquerade)
6161
Network.IPv6PrivacyExtensions, config_parse_ipv6_privacy_extensions, 0, offsetof(Network, ipv6_privacy_extensions)
6262
Network.IPv6AcceptRA, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
63-
Network.ActiveSlave, config_parse_bool, 0, offsetof(Network, active_slave)
64-
Network.PrimarySlave, config_parse_bool, 0, offsetof(Network, primary_slave)
65-
/* legacy alias for the above */
6663
Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
6764
Network.IPv6DuplicateAddressDetection, config_parse_int, 0, offsetof(Network, ipv6_dad_transmits)
6865
Network.IPv6HopLimit, config_parse_int, 0, offsetof(Network, ipv6_hop_limit)
69-
Network.ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp)
66+
Network.ActiveSlave, config_parse_bool, 0, offsetof(Network, active_slave)
67+
Network.PrimarySlave, config_parse_bool, 0, offsetof(Network, primary_slave)
7068
Network.IPv4ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp)
69+
Network.ProxyARP, config_parse_tristate, 0, offsetof(Network, proxy_arp)
7170
Network.BindCarrier, config_parse_strv, 0, offsetof(Network, bind_carrier)
7271
Address.Address, config_parse_address, 0, 0
7372
Address.Peer, config_parse_address, 0, 0

0 commit comments

Comments
 (0)