[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

routed behavior



I just noticed this while reading the routed source code, and it doesn't
make sense to me.
I'm looking at /usr/src/sbin/routed/input.c, in the code where the daemon
handles a rip reply. (line 477)

                        gate = from->sin_addr.s_addr;
                        if (n->n_nhop != 0) {
                                if (rip->rip_vers == RIPv2) {
                                        n->n_nhop = 0;
                                } else {
                                    /* Use it only if it is valid. */
...

It looks to me like a RIP v1 message will be able to specify a gateway
address if it is valid, and a RIP v2 message will always have that zero'd
out. Isn't it supposed to be the other way around?
Im thinking maybe
                                if (rip->rip_vers == RIPv1) {
                                        n->n_nhop = 0;
Am I missing something?

Thanks,
John McDonald

Visit your host, monkey.org