Bug 193245 - net/bird: Needs patching since raw_socket change
Summary: net/bird: Needs patching since raw_socket change
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alexander V. Chernikov
URL:
Keywords: patch, regression
Depends on:
Blocks:
 
Reported: 2014-09-02 05:15 UTC by olivier
Modified: 2014-10-06 16:30 UTC (History)
2 users (show)

See Also:


Attachments
Here is a working patch (1.38 KB, patch)
2014-09-26 10:09 UTC, olivier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2014-09-02 05:15:21 UTC
Following the commit r270929 in -current (detail here: https://wiki.freebsd.org/SOCK_RAW), net/bird needs to be adapted.
Using OSPF with bird on this new -current didn't work and log message show this:

Sep  2 07:08:58 R4 bird: R4: Socket error on vtnet2: Invalid argument

In file sysdep/bsd/sysio.h, there is this code:

#ifdef __OpenBSD__
  /* OpenBSD expects ip_len in network order, other BSDs expect host order */
  ip->ip_len = htons(ip->ip_len);
#endif

I've tried to replace by:
#if defined(__OpenBSD__) || (__FreeBSD_version >= 1100030)
  /* OpenBSD and FreeBSD (since 11) expects ip_len in network order, other BSDs expect host order */
   ip->ip_len = htons(ip->ip_len);
#endif

But it's not enough for fixing the issue: I need help for a working patch.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-04 08:20:37 UTC
CC Maintainer.
Comment 2 olivier 2014-09-26 10:09:15 UTC
Created attachment 147686 [details]
Here is a working patch

Updated working patch
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-09-27 08:45:19 UTC
A commit references this bug:

Author: melifaro
Date: Sat Sep 27 08:45:14 UTC 2014
New revision: 369382
URL: https://svnweb.freebsd.org/changeset/ports/369382

Log:
  Fix raw sockets operation for bird on -current.

  PR:		193245
  Submitted by:	olivier
  Approved by:	az (implicit)

Changes:
  head/net/bird/Makefile
  head/net/bird/files/patch-bsd-sysdep.h
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-28 02:20:54 UTC
Assign to melifaro@ for resolution post-commit (r369382), or a comment on what's left to do
Comment 5 olivier 2014-10-06 16:30:22 UTC
All done: There is nothing left to do.
Thanks melifaro!