From: Yu Watanabe Date: Sat, 17 Aug 2024 06:25:04 +0000 (+0900) Subject: network/routing-policy-rule: reorder elements of RoutingPolicyRule and add comments X-Git-Tag: v257-rc1~678^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a3a3a2a1eb4d839971100cd4639ae98b4aa014c;p=thirdparty%2Fsystemd.git network/routing-policy-rule: reorder elements of RoutingPolicyRule and add comments No functional change, just refactoring. --- diff --git a/src/network/networkd-routing-policy-rule.h b/src/network/networkd-routing-policy-rule.h index 60524c00a0c..23aa041180c 100644 --- a/src/network/networkd-routing-policy-rule.h +++ b/src/network/networkd-routing-policy-rule.h @@ -20,37 +20,36 @@ typedef struct RoutingPolicyRule { NetworkConfigSource source; NetworkConfigState state; - bool invert_rule; + /* struct fib_rule_hdr */ + AddressFamily address_family; /* Specified by Family= */ + int family; /* Automatically determined by From= or To= */ + uint8_t to_prefixlen; + uint8_t from_prefixlen; + uint8_t tos; + uint8_t type; /* a.k.a action */ + bool invert_rule; /* used for flags */ + + /* attributes */ + union in_addr_union to; /* FRA_DST */ + union in_addr_union from; /* FRA_SRC */ + char *iif; /* FRA_IIFNAME */ + /* FRA_GOTO */ bool priority_set; + uint32_t priority; /* FRA_PRIORITY */ + uint32_t fwmark; /* FRA_FWMARK */ + /* FRA_FLOW */ + /* FRA_TUN_ID */ + int32_t suppress_ifgroup; /* FRA_SUPPRESS_IFGROUP */ + int suppress_prefixlen; /* FRA_SUPPRESS_PREFIXLEN */ + uint32_t table; /* FRA_TABLE, also used in struct fib_rule_hdr */ + uint32_t fwmask; /* FRA_FWMASK */ + char *oif; /* FRA_OIFNAME */ bool l3mdev; /* FRA_L3MDEV */ - - uint8_t tos; - uint8_t type; - uint8_t ipproto; /* FRA_IP_PROTO */ + struct fib_rule_uid_range uid_range; /* FRA_UID_RANGE */ uint8_t protocol; /* FRA_PROTOCOL */ - uint8_t to_prefixlen; - uint8_t from_prefixlen; - - uint32_t table; - uint32_t fwmark; - uint32_t fwmask; - uint32_t priority; - - AddressFamily address_family; /* Specified by Family= */ - int family; /* Automatically determined by From= or To= */ - - char *iif; - char *oif; - - union in_addr_union to; - union in_addr_union from; - - struct fib_rule_port_range sport; - struct fib_rule_port_range dport; - struct fib_rule_uid_range uid_range; - - int suppress_prefixlen; - int32_t suppress_ifgroup; + uint8_t ipproto; /* FRA_IP_PROTO */ + struct fib_rule_port_range sport; /* FRA_SPORT_RANGE */ + struct fib_rule_port_range dport; /* FRA_DPORT_RANGE */ } RoutingPolicyRule; const char* fr_act_type_full_to_string(int t) _const_;