Hello all ns2 users:

      I'm a user of your DYMOUM soft. When I use DYMOUM 0.3 for a simulation
in ns-2, I found a bug in it.

      In file  dymoum0,3/ns/dymo_um.cc  from line 244 to line 262

244        dest_addr.s_addr    = ih->daddr();
245       rtable_entry_t *entry    = rtable_find(dest_addr);
246        if (!entry || entry->rt_state == RT_INVALID) {
247            // If I am the originating node, then a route discovery
248            // must be performed
249            if (ih->saddr() == ra_addr_) {
250                packet_queue_add(p, dest_addr);
251                route_discovery(dest_addr);
252            }
253            // Else we must send a RERR message to the source if
254            // the route has been previously used
255            else {
256                if (entry->rt_is_used)
257                    rerr_send(dest_addr, NET_DIAMETER, entry);
258                drop(p, DROP_RTR_NO_ROUTE);
259            }
260            schedule_next_event();
261            return;
262        }

Notice in line 256, if(entry->rt_is_used) the variable "entry" here may be
NULL, if "entry" is NULL, "entry->rt_is_used" will cause a segmentation
fault.

I think the line 256 should be modified like this:
if(entry && entry->rt_is_used)


-- 
Wayne Shu

Reply via email to