[Olsr-dev] [olsrd] [PATCH v3 2/2] gateway: only advertise linkspeed when the link is bi-directional
Henning Rogge
(spam-protected)
Thu Jul 19 10:07:47 CEST 2012
Good catch.
Henning
On 07/19/2012 09:54 AM, Ferry Huberts wrote:
> From: Ferry Huberts <(spam-protected)>
>
> Uni-directional links produce all kinds of funky network behaviour.
>
> Signed-off-by: Ferry Huberts <(spam-protected)>
> ---
> src/gateway.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/gateway.c b/src/gateway.c
> index ee122b7..74b7d19 100644
> --- a/src/gateway.c
> +++ b/src/gateway.c
> @@ -131,7 +131,8 @@ void refresh_smartgw_netmask(void) {
>
> ip = (uint8_t *) &smart_gateway_netmask;
>
> - if (olsr_cnf->smart_gw_uplink > 0 || olsr_cnf->smart_gw_downlink > 0) {
> + if (olsr_cnf->smart_gw_uplink > 0 && olsr_cnf->smart_gw_downlink > 0) {
> + /* the link is bi-directional with a non-zero bandwidth */
> ip[GW_HNA_FLAGS] |= GW_HNA_FLAG_LINKSPEED;
> ip[GW_HNA_DOWNLINK] = serialize_gw_speed(olsr_cnf->smart_gw_downlink);
> ip[GW_HNA_UPLINK] = serialize_gw_speed(olsr_cnf->smart_gw_uplink);
>
--
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961, Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120719/e0730dda/attachment.bin>
More information about the Olsr-dev
mailing list