Skip to content

Commit c370061

Browse files
committed
Merge: ipv4: Don't reset ->flowi4_scope in ip_rt_fix_tos().
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5284 JIRA: https://issues.redhat.com/browse/RHEL-59754 RHEL-57748 backported `ec20b2830093 ("ipv4: Set scope explicitly in ip_route_output().")`, which will set `ip_route_output` tos to 0. This breaks bonding arp monitoring as later in `ip_rt_fix_tos` the scope is reset to RT_SCOPE_UNIVERSE since `tos` is 0. The backported patch 16a2826 ("ipv4: Don't reset ->flowi4_scope in ip_rt_fix_tos().") fixed this issue as the scope will not set to RT_SCOPE_UNIVERSE. Signed-off-by: Hangbin Liu <haliu@redhat.com> Approved-by: Guillaume Nault <gnault@redhat.com> Approved-by: Florian Westphal <fwestpha@redhat.com> Approved-by: Ivan Vecera <ivecera@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents 0e52ad8 + 6faaad5 commit c370061

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/route.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ static void ip_rt_fix_tos(struct flowi4 *fl4)
512512
__u8 tos = RT_FL_TOS(fl4);
513513

514514
fl4->flowi4_tos = tos & IPTOS_RT_MASK;
515-
fl4->flowi4_scope = tos & RTO_ONLINK ?
516-
RT_SCOPE_LINK : RT_SCOPE_UNIVERSE;
515+
if (tos & RTO_ONLINK)
516+
fl4->flowi4_scope = RT_SCOPE_LINK;
517517
}
518518

519519
static void __build_flow_key(const struct net *net, struct flowi4 *fl4,

0 commit comments

Comments
 (0)