Bug 22846

Summary: Routed does not reflect preference of Internet Router Discovery Protocol.
Product: Base System Reporter: masato-k <masato-k>
Component: binAssignee: Bruce M Simpson <bms>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
routed.diff none

Description masato-k 2000-11-14 17:00:01 UTC
Routed does not reflect preference of Internet Router Discovery Protocol.
Solicit: 0 and positive number preference are treated as 1.
Advertise: 0 and positive number preference are treated as -2,147,483,647.

src/sbin/routed/rdisc.c,v 1.3 or later, PREF macro cast dr_recv_pref to int.
But dr_recv_pref is biased unsigned value.
As a result, 0 and positive number preference on network become minus value.

Fix: I seem the following patch is proper.
This is diff from src/sbin/routed/rdisc.c,v 1.5
How-To-Repeat: There are two router running GateD, preference is 0 and 16.
Connect a host running routed with `-P no_rip', it selects first response for default route.
Routed does not prefer that large preference.
Comment 1 Bruce M Simpson freebsd_committer freebsd_triage 2003-11-25 17:09:27 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

This probably wants wider discussion on -net
Comment 2 Andre Oppermann freebsd_committer freebsd_triage 2003-12-30 09:59:14 UTC
Responsible Changed
From-To: freebsd-net->andre

Take over.
Comment 3 Andre Oppermann freebsd_committer freebsd_triage 2004-01-15 13:04:44 UTC
State Changed
From-To: open->feedback

From my looking at the fix it seems to be correct and the bug is 
still present in our routed and the newest version (2.27) I've 
found in NetBSD.  I've asked christos@netbsd for the email address 
of the routed maintainer to discuss the bug and fix with him.
Comment 4 Andre Oppermann freebsd_committer freebsd_triage 2004-01-15 13:41:57 UTC
State Changed
From-To: feedback->analyzed

My reading of the code confirms the bug.  I've got the maintainer 
information from christos and have contacted maintainer.
Comment 5 Andre Oppermann freebsd_committer freebsd_triage 2004-01-15 22:31:28 UTC
Maintainer of routed has responded that this is not a bug
but the way things are supposed to work.  However he notes
that we don't have the most up to date version of routed
in our tree and are missing some important other bug fixes.

I'll prepare the import of routed 1.27 soon.

-- 
Andre
Comment 6 Bruce M Simpson freebsd_committer freebsd_triage 2004-06-22 22:38:28 UTC
Responsible Changed
From-To: andre->bms

I'll take this as I did the import last. 
Fix is pending import of next routed release. 
Diff from our off-branch table.c sent to maintainers to minimize diffs 
when that happens.
Comment 7 Bruce M Simpson freebsd_committer freebsd_triage 2006-08-07 15:10:52 UTC
State Changed
From-To: analyzed->closed

No response from submitter, and patched version of routed 
has been in the tree for several releases