Date: Tue, 14 Nov 2000 08:57:52 -0800 (PST) From: masato-k@is.aist-nara.ac.jp To: freebsd-gnats-submit@FreeBSD.org Subject: bin/22846: Routed does not reflect preference of Internet Router Discovery Protocol. Message-ID: <20001114165752.167D037B4D7@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 22846
>Category: bin
>Synopsis: Routed does not reflect preference of Internet Router Discovery Protocol.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 14 09:00:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: KAKIUCHI Masatoshi
>Release: 4.1-RELEASE
>Organization:
Nara Institute of Science and Technology
>Environment:
FreeBSD saudec02.aist-nara.ac.jp 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Tue Aug 1 00:24:45 JST 2000 masato-k@saudec02.aist-nara.ac.jp:/usr/src/sys/compile/SAUDEC02 i386
>Description:
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.
>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.
>Fix:
I seem the following patch is proper.
This is diff from src/sbin/routed/rdisc.c,v 1.5
begin 644 routed.diff
M9&EF9B`M8W(@<F]U=&5D+F]R9R]R9&ES8RYC(')O=71E9"]R9&ES8RYC"BHJ
M*B!R;W5T960N;W)G+W)D:7-C+F,)36]N(%-E<"`@-B`P,CHT.3HQ,2`Q.3DY
M"BTM+2!R;W5T960O<F1I<V,N8PE7960@3F]V(#$U(#`Q.C,Q.C(X(#(P,#`*
M*BHJ*BHJ*BHJ*BHJ*BHJ"BHJ*B`Y-RPQ,#,@*BHJ*@H@("-D969I;F4@54Y3
M24=.7U!2148H<"D@4TE'3E]04D5&*'`I"B`@+RH@861J=7-T('5N<VEG;F5D
M('!R969E<F5N8V4@8GD@:6YT97)F86-E(&UE=')I8RP*("`@*B!W:71H;W5T
M(&1R:79I;F<@:70@=&\@:6YF:6YI='D@*B\*(2`C9&5F:6YE(%!2148H<"P@
M:69P*2`H*&EN="DH<"D@/#T@*&EF<"DM/FEN=%]M971R:6,@/R`H*'`I("$]
M(#`@/R`Q(#H@,"D@7`H@(`D)("`@("`@.B`H<"D@+2`H*&EF<"DM/FEN=%]M
M971R:6,I*0H@(`H@('-T871I8R!V;VED(')D:7-C7W-O<G0H=F]I9"D["BTM
M+2`Y-RPQ,#,@+2TM+0H@("-D969I;F4@54Y324=.7U!2148H<"D@4TE'3E]0
M4D5&*'`I"B`@+RH@861J=7-T('5N<VEG;F5D('!R969E<F5N8V4@8GD@:6YT
M97)F86-E(&UE=')I8RP*("`@*B!W:71H;W5T(&1R:79I;F<@:70@=&\@:6YF
M:6YI='D@*B\*(2`C9&5F:6YE(%!2148H<"P@:69P*2`H*'`I(#P]("AI9G`I
M+3YI;G1?;65T<FEC(#\@*"AP*2`A/2`P(#\@,2`Z(#`I(%P*("`)"2`@("`@
M(#H@*'`I("T@*"AI9G`I+3YI;G1?;65T<FEC*2D*("`*("!S=&%T:6,@=F]I
49"!R9&ES8U]S;W)T*'9O:60I.PI?
`
end
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001114165752.167D037B4D7>
