Page MenuHomeFreeBSD

inet6: Do not assume every interface has ip6 enabled
ClosedPublic

Authored by kp on Dec 11 2015, 7:49 PM.
Referenced Files
F83279041: D4522.diff
Wed, May 8, 8:58 AM
Unknown Object (File)
Sun, May 5, 10:45 PM
Unknown Object (File)
Wed, Apr 17, 5:59 AM
Unknown Object (File)
Wed, Apr 17, 5:50 AM
Unknown Object (File)
Mar 15 2024, 5:39 PM
Unknown Object (File)
Mar 15 2024, 5:36 PM
Unknown Object (File)
Dec 22 2023, 10:18 PM
Unknown Object (File)
Nov 21 2023, 7:43 PM

Details

Summary

Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words,
ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is
updated.

pfsync interfaces will never have ip6 support, because it's explicitly disabled
in in6_domifattach().

PR: 205194

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kp retitled this revision from to inet6: Do not assume every interface has ip6 enabled.
kp updated this object.
kp edited the test plan for this revision. (Show Details)
kp set the repository for this revision to rS FreeBSD src repository - subversion.
kp added a project: network.
melifaro added a reviewer: melifaro.

According to the summary, it looks ok. Ensuring entire inet6/ code would work in all similar cases require (probably much) more work :)

sys/netinet6/in6.c
2427

Well, the function is supposed to return MTU value. 46 is definitely better than panic, but It would probably be better to return ifp->if_mtu.

This revision is now accepted and ready to land.Dec 11 2015, 9:13 PM
sys/netinet6/in6.c
2427

You're quite right. We should do what the caller (if_getmtu_family()) does if it can't get a better answer and return ifp->if_mtu.

kp updated this object.
kp edited edge metadata.
This revision now requires review to proceed.Dec 11 2015, 10:17 PM
melifaro edited edge metadata.
This revision is now accepted and ready to land.Dec 14 2015, 9:25 AM
hrs added a reviewer: hrs.
This revision was automatically updated to reflect the committed changes.