Skip to content

Commit

Permalink
Plan 9 from Bell Labs 2003-04-23
Browse files Browse the repository at this point in the history
  • Loading branch information
0intro committed Apr 23, 2003
1 parent 0c00552 commit cc0f006
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ip/devip.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ setladdrport(Conv* c, char* str, int announcing)
char *p;
char *rv;
ushort lport;
uchar addr[IPaddrlen];

rv = nil;

Expand All @@ -844,8 +845,13 @@ setladdrport(Conv* c, char* str, int announcing)
} else {
if(strcmp(str, "*") == 0)
ipmove(c->laddr, IPnoaddr);
else
parseip(c->laddr, str);
else {
parseip(addr, str);
if(ipforme(c->p->f, addr))
ipmove(c->laddr, addr);
else
return "not a local IP address";
}
}

/* one process can get all connections */
Expand Down

0 comments on commit cc0f006

Please sign in to comment.