bebf0a30b1
The actual functionality is untested, but without this patch, ytalk just seg-faults as soon as readdress appears in a configuration file. Problem reported as random segfaults by todd@, nice common debugging session :)
28 lines
824 B
Plaintext
28 lines
824 B
Plaintext
--- socket.c.orig Wed Mar 17 02:31:30 1999
|
|
+++ socket.c Wed Mar 17 02:36:50 1999
|
|
@@ -214,7 +214,8 @@
|
|
register readdr *r;
|
|
|
|
for(r = readdr_list; r != NULL; r = r->next)
|
|
- if((addr & r->mask) == r->addr)
|
|
+ if( ((r->from_addr & r->from_mask) == (me->host_addr & r->from_mask))
|
|
+ && ((addr & r->mask) == r->addr) )
|
|
{
|
|
addr = (r->id_addr & r->id_mask) |
|
|
(me->host_addr & (~(r->id_mask)));
|
|
@@ -951,12 +952,12 @@
|
|
to_mask = make_net_mask(to_addr);
|
|
on_mask = make_net_mask(on_addr);
|
|
|
|
- if((from_addr & from_mask) != (me->host_addr & from_mask))
|
|
- return;
|
|
if(from_addr == to_addr)
|
|
return;
|
|
|
|
new = (readdr *)get_mem(sizeof(readdr));
|
|
+ new->from_addr = from_addr;
|
|
+ new->from_mask = from_mask;
|
|
new->addr = on_addr;
|
|
new->mask = on_mask;
|
|
new->id_addr = to_addr;
|