Bug 211717 - net/bird: Does not set up routing
Summary: net/bird: Does not set up routing
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Olivier Cochard
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-08-10 07:30 UTC by Borodin Oleg
Modified: 2018-11-10 23:07 UTC (History)
5 users (show)

See Also:
olivier: maintainer-feedback+
olivier: merge-quarterly-
olivier: exp-run-


Attachments
net/burd update to 1.6, port prototype (29.57 KB, application/gzip)
2016-08-10 07:38 UTC, Borodin Oleg
no flags Details
change buffer [size] for route message (1.23 KB, patch)
2016-08-10 07:42 UTC, Borodin Oleg
vlad-fbsd: maintainer-approval? (melifaro)
Details | Diff
net/bird port upgrade to 1.6, not fully tested (29.79 KB, application/gzip)
2016-08-17 07:38 UTC, Borodin Oleg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Borodin Oleg 2016-08-10 07:30:14 UTC
Bird, 1.5 and 1.6, on FreeBSD 11 don't install route to kernel. 


==Symptom==

In log:

2016-08-07 02:28:55 <ERR> KRT: Error sending route 10.120.1.98/32 to kernel: Address family not supported by protocol family

From route monitor:

got message of size 128 on Sun Aug  7 19:52:27 2016
RTM_ADD: Add Route: len 128, pid: 3683, seq 312, errno 22, flags:<UP,GATEWAY,HOST,PROTO1>
locks:  inits: 
sockaddrs: <DST,GATEWAY>
pmsg_addrs: truncated route message, only 36 bytes left

But correct size of standart message for IPv4 route must 124 or 140 bytes.

For IPv6 the same symptoms.

==Cause==

Incorrect packing route message to kernel.

Work patch in attachment.
Comment 1 Borodin Oleg 2016-08-10 07:38:05 UTC
Created attachment 173487 [details]
net/burd update to 1.6, port prototype

net/burd update to 1.6, port prototype
need some "cosmetic" correction for standard freebsd port.
Comment 2 Borodin Oleg 2016-08-10 07:42:48 UTC
Created attachment 173488 [details]
change buffer [size] for route message
Comment 3 VK freebsd_triage 2016-08-13 08:40:26 UTC
Thanks for the patch. Can you confirm the changes pass QA (portlint, poudriere)?
Comment 4 Alexander V. Chernikov freebsd_committer freebsd_triage 2016-08-14 05:44:53 UTC
This looks a bit weird.
I'm unable to reproduce this.

Could you share more details about your system (svn version, architecture), how bird is actually build?

Also, according to the NEXTADDR macro change:
if I read the code correctly, you embedded slightly different variant of ROUNDUP() macro inside:

// stock
#define ROUNDUP(a) \
        ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
// embedded
#define ROUNDUP(a) \
        (((a) == 0) ? sizeof(long) : 1 + (((a) - 1) | (sizeof(long) - 1)))

which looks very close to original.

What is the reason in decreasing per-addr buffer size ? (sockaddr_storage - > sockaddr)
Comment 5 Borodin Oleg 2016-08-17 07:32:27 UTC
>Could you share more details about your system (svn version, architecture), how bird is actually build?

# uname -prmoUK
FreeBSD 11.0-BETA4 arm armv6 1100120 1100120

# svn info /usr/src/ | grep Revi
Revision: r303808

>What is the reason in decreasing per-addr buffer size ? (sockaddr_storage - > sockaddr)

---
got message of size 128 on Sun Aug  7 19:52:27 2016
pmsg_addrs: truncated route message, only 36 bytes left
---
1. Message increased by 4 bytes from normal. The same for other type of message, 140 increased to 144.
2. Interpreted as a message of less bytes that in normal

I assumed that the wrong interpretation because of incorrect route message generation, from a offset of record address. 

I know little about network logic, and the decision found intuitively.
Comment 6 Borodin Oleg 2016-08-17 07:35:43 UTC
(In reply to Vladimir Krstulja from comment #3)


[ root:~/portlint/bird/ ]
# portlint 
WARN: Makefile: unless this is a master port, PORTNAME has to be set by "=", not by "?=".
WARN: Makefile: unless this is a master port, COMMENT has to be set by "=", not by "?=".
0 fatal errors and 2 warnings found.

I reattached new port version.
Comment 7 Borodin Oleg 2016-08-17 07:38:46 UTC
Created attachment 173765 [details]
net/bird port upgrade to 1.6, not fully tested
Comment 8 Borodin Oleg 2016-08-17 08:27:13 UTC
(In reply to Alexander V. Chernikov from comment #4)

Reply in comment up.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2016-08-17 11:49:39 UTC
Maintainer is committer, assign accordingly

Needs ports (committer) approval and MFH if quarterly users are affected.
Comment 10 Alexander V. Chernikov freebsd_committer freebsd_triage 2016-08-17 11:56:26 UTC
Okay, so I it looks like the problem arm-specific due to alignment issues.

I need some time to reproduce this / validate fix.
Comment 11 Borodin Oleg 2016-08-17 18:42:51 UTC
(In reply to Alexander V. Chernikov from comment #10)

> I it looks like the problem arm-specific due to alignment issues.

You look it as, or you checked out/validated on other platforms with freebsd 11? For information only.
Comment 12 Alexander V. Chernikov freebsd_committer freebsd_triage 2016-08-17 19:11:41 UTC
We have quite a lot of bird/bird6 servers running on 11/amd64.
Comment 13 Walter Schwarzenfeld freebsd_triage 2018-01-17 06:58:12 UTC
Does the problem still extists?
Comment 14 Walter Schwarzenfeld freebsd_triage 2018-02-07 17:47:11 UTC
Assigned to new maintainer.
Comment 15 Olivier Cochard freebsd_committer freebsd_triage 2018-02-07 18:07:00 UTC
Does this problem still exists on bird 1.6.3 ?