Closed Bug 1649678 Opened 4 years ago Closed 4 years ago

FTBFS in nICEr/src/stun/addrs-bsd.c on OpenBSD

Categories

(Core :: WebRTC: Networking, defect, P2)

Unspecified
OpenBSD
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox78 --- unaffected
firefox79 --- fixed
firefox80 --- fixed

People

(Reporter: gaston, Assigned: bwc)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

79.0b1 fails hard with:

/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:36:20: error: variable has incomplete type 'struct in6_ifreq'
  struct in6_ifreq ifr6;
                   ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:36:10: note: forward declaration of 'struct in6_ifreq'
  struct in6_ifreq ifr6;
         ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:42:16: error: use of undeclared identifier 'SIOCGIFAFLAG_IN6'
  if (ioctl(s, SIOCGIFAFLAG_IN6, &ifr6) != -1) {
               ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:54:19: error: use of undeclared identifier 'IN6_IFF_ANYCAST'
  return flags & (IN6_IFF_ANYCAST | IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED | IN6_IFF_DETACHED | IN6_IFF_DEPRECATED);
                  ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:54:37: error: use of undeclared identifier 'IN6_IFF_TENTATIVE'
  return flags & (IN6_IFF_ANYCAST | IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED | IN6_IFF_DETACHED | IN6_IFF_DEPRECATED);
                                    ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:54:57: error: use of undeclared identifier 'IN6_IFF_DUPLICATED'
  return flags & (IN6_IFF_ANYCAST | IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED | IN6_IFF_DETACHED | IN6_IFF_DEPRECATED);
                                                        ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:54:78: error: use of undeclared identifier 'IN6_IFF_DETACHED'
  return flags & (IN6_IFF_ANYCAST | IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED | IN6_IFF_DETACHED | IN6_IFF_DEPRECATED);
                                                                             ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:54:97: error: use of undeclared identifier 'IN6_IFF_DEPRECATED'
  return flags & (IN6_IFF_ANYCAST | IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED | IN6_IFF_DETACHED | IN6_IFF_DEPRECATED);
                                                                                                ^
/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:86:27: error: use of undeclared identifier 'IN6_IFF_TEMPORARY'
              if (flags & IN6_IFF_TEMPORARY) {

seems all those defines/structs are only in netinet6/in6_var.h, which is only included by net/if_sppp.h on OpenBSD. Not sure those are supposed to be public ?

trying the obvious by including netinet6/in6_var.h below netinet/in.h in addrs-bsd.c.

adding that #include leaves only one missing define for IN6_IFF_TEMPORARY which isnt defined on OpenBSD.

/usr/obj/ports/firefox-79.0beta1/firefox-79.0/media/mtransport/third_party/nICEr/src/stun/addrs-bsd.c:87:27: error: use
 of undeclared identifier 'IN6_IFF_TEMPORARY'
              if (flags & IN6_IFF_TEMPORARY) {
                          ^
1 error generated.

In the meantime, internal discussions on OpenBSD developers list agree that we should add a #define for IN6_IFF_TEMPORARY as an alias for IN6_IFF_PRIVACY, which is the same concept - per https://github.com/openbsd/src/blob/master/sys/netinet6/in6_var.h#L294.

So to properly fix this issue, only the inclusing of <netinet6/in6_var.h> seems required on the mozilla side.

Set release status flags based on info from the regressing bug 1183145

Byron, any thoughts?

Flags: needinfo?(docfaraday)

In the meantime, IN6_IFF_PRIVACY was renamed to IN6_IFF_TEMPORARY in OpenBSD: https://marc.info/?l=openbsd-cvs&m=159379818808143&w=2

I'll take care of this.

Flags: needinfo?(docfaraday)
Severity: -- → S3
Priority: -- → P2
Pushed by bcampen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/76b3c77b815d
Add include needed by OpenBSD. r=mjf
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80

The patch landed in nightly and beta is affected.
:bwc, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(docfaraday)

Yeah, this is a really simple change.

Flags: needinfo?(docfaraday)

Comment on attachment 9161880 [details]
Bug 1649678: Add include needed by OpenBSD. r?mjf

Beta/Release Uplift Approval Request

  • User impact if declined: Build failures on OpenBSD.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just adding an include. Pretty safe.
  • String changes made/needed: None.
Attachment #9161880 - Flags: approval-mozilla-beta?

Comment on attachment 9161880 [details]
Bug 1649678: Add include needed by OpenBSD. r?mjf

Approved for 79.0b7.

Attachment #9161880 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: