[Olsr-dev] Mercurial issue

Henning Rogge (spam-protected)
Thu Feb 5 08:56:21 CET 2009

Am Thursday 05 February 2009 08:48:52 schrieb Sven-Ola Tuecke:
> Hey,
> oops - german. Yes - it was a little late yesterday. I've mixed up dyn_gw
> with dyn_gw_plain (similar filename). @henning: the iface[16]->iface[17]
> does really only apply to dyn_gw_plain? The dyn_gw still uses 16...
Yes, opps... ^^

Aaron and me just fixed bugs the BSD gcc fired.

In dyn_gw we use a
  int num = sscanf(buf, "%15s %128X %128X %X %d %d %d %128X \n",
                     iface, &dest_addr, &gate_addr,
                     &iflags, &refcnt, &use, &metric, &netmask);
to initialize iface (maximum of 15 characters), so there is enough space for 
the null byte.

In dyn_gw_plain we use
      sscanf(buff, "%16s %128X %128X %X %d %d %d %128X \n",
                    iface, &dest_addr, &gate_addr,
                    &iflags, &refcnt, &use, &metric, &netmask);
which reads 16 bytes, so there was no space left for a null byte and we fixed 
this (without knowing about the different sollution in dyn_gw).

Diplom Informatiker Henning Rogge
Forschungsgesellschaft für
Angewandte Naturwissenschaften e. V. (FGAN) 
Neuenahrer Str. 20, 53343 Wachtberg, Germany
Tel.: 0049 (0)228 9435-961
Fax: 0049 (0)228 9435-685
E-Mail: (spam-protected)
Web: www.fgan.de
Sitz der Gesellschaft: Bonn
Registergericht: Amtsgericht Bonn VR 2530
Vorstand: Prof. Dr. rer. nat. Maurus Tacke (komm. Vors.), Prof. Dr.-Ing. 
Joachim Ender (Stellv.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20090205/2912ce9a/attachment.sig>

More information about the Olsr-dev mailing list