diff -rc2P linux-2.4.18ctx-8/Makefile linux-2.4.18ctx-9/Makefile *** linux-2.4.18ctx-8/Makefile Sat Mar 2 14:17:33 2002 --- linux-2.4.18ctx-9/Makefile Wed Feb 27 16:13:27 2002 *************** *** 2,6 **** PATCHLEVEL = 4 SUBLEVEL = 18 ! EXTRAVERSION =ctx-8 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) --- 2,6 ---- PATCHLEVEL = 4 SUBLEVEL = 18 ! EXTRAVERSION =ctx-9 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) diff -rc2P linux-2.4.18ctx-8/fs/proc/array.c linux-2.4.18ctx-9/fs/proc/array.c *** linux-2.4.18ctx-8/fs/proc/array.c Tue Feb 26 22:31:23 2002 --- linux-2.4.18ctx-9/fs/proc/array.c Mon Mar 18 12:13:32 2002 *************** *** 298,301 **** --- 298,302 ---- buffer += sprintf (buffer,"s_context: %d\n",task->s_context); buffer += sprintf (buffer,"ipv4root: %08lx\n",task->ipv4root); + buffer += sprintf (buffer,"ipv4root_bcast: %08lx\n",task->ipv4root_bcast); if (task->s_info != NULL){ buffer += sprintf (buffer,"ctxticks: %d %ld %d\n" *************** *** 312,316 **** } buffer += sprintf (buffer,"__NR_new_s_context: %d\n",__NR_new_s_context); ! buffer += sprintf (buffer,"__NR_set_ipv4root: %d\n",__NR_set_ipv4root); #if defined(CONFIG_ARCH_S390) buffer = task_show_regs(task, buffer); --- 313,317 ---- } buffer += sprintf (buffer,"__NR_new_s_context: %d\n",__NR_new_s_context); ! buffer += sprintf (buffer,"__NR_set_ipv4root: %d rev1\n",__NR_set_ipv4root); #if defined(CONFIG_ARCH_S390) buffer = task_show_regs(task, buffer); diff -rc2P linux-2.4.18ctx-8/include/linux/sched.h linux-2.4.18ctx-9/include/linux/sched.h *** linux-2.4.18ctx-8/include/linux/sched.h Thu Feb 28 11:58:05 2002 --- linux-2.4.18ctx-9/include/linux/sched.h Mon Mar 18 12:11:01 2002 *************** *** 435,438 **** --- 435,439 ---- __u32 cap_bset; /* Maximum capability of this process and children */ unsigned long ipv4root; /* Process can only bind to this iP */ + unsigned long ipv4root_bcast; struct context_info *s_info; void *notifier_data; diff -rc2P linux-2.4.18ctx-8/include/net/sock.h linux-2.4.18ctx-9/include/net/sock.h *** linux-2.4.18ctx-8/include/net/sock.h Thu Feb 28 11:59:59 2002 --- linux-2.4.18ctx-9/include/net/sock.h Mon Mar 18 12:13:37 2002 *************** *** 491,494 **** --- 491,495 ---- __u32 daddr; /* Foreign IPv4 addr */ __u32 rcv_saddr; /* Bound local IPv4 addr */ + __u32 bcast_addr; /* Local bcast addr, for ipv4root */ __u16 dport; /* Destination port */ unsigned short num; /* Local port */ diff -rc2P linux-2.4.18ctx-8/net/ipv4/af_inet.c linux-2.4.18ctx-9/net/ipv4/af_inet.c *** linux-2.4.18ctx-8/net/ipv4/af_inet.c Tue Feb 26 22:31:23 2002 --- linux-2.4.18ctx-9/net/ipv4/af_inet.c Mon Mar 18 12:26:22 2002 *************** *** 481,484 **** --- 481,485 ---- int err; __u32 s_addr; + __u32 bcast_addr = 0xffffffffl; /* If the socket has its own bind function then use it. (RAW) */ *************** *** 492,496 **** if (current->ipv4root != 0){ // printk ("ipv4root0 %08lx %08x\n",current->ipv4root,s_addr); ! if (s_addr == 0 || s_addr == 0x0100007f){ s_addr = current->ipv4root; }else if (s_addr != current->ipv4root){ --- 493,500 ---- if (current->ipv4root != 0){ // printk ("ipv4root0 %08lx %08x\n",current->ipv4root,s_addr); ! if (s_addr == 0){ ! s_addr = current->ipv4root; ! bcast_addr = current->ipv4root_bcast; ! }else if (s_addr == 0x0100007f){ s_addr = current->ipv4root; }else if (s_addr != current->ipv4root){ *************** *** 536,539 **** --- 540,544 ---- sk->rcv_saddr = sk->saddr = s_addr; + sk->bcast_addr = bcast_addr; if (chk_addr_ret == RTN_MULTICAST || chk_addr_ret == RTN_BROADCAST) sk->saddr = 0; /* Use device */ diff -rc2P linux-2.4.18ctx-8/net/ipv4/udp.c linux-2.4.18ctx-9/net/ipv4/udp.c *** linux-2.4.18ctx-8/net/ipv4/udp.c Tue Feb 26 22:31:23 2002 --- linux-2.4.18ctx-9/net/ipv4/udp.c Mon Mar 18 13:26:18 2002 *************** *** 273,277 **** (s->daddr && s->daddr!=rmt_addr) || (s->dport != rmt_port && s->dport != 0) || ! (s->rcv_saddr && s->rcv_saddr != loc_addr) || (s->bound_dev_if && s->bound_dev_if != dif)) continue; --- 273,277 ---- (s->daddr && s->daddr!=rmt_addr) || (s->dport != rmt_port && s->dport != 0) || ! (s->rcv_saddr && s->rcv_saddr != loc_addr && s->bcast_addr != loc_addr) || (s->bound_dev_if && s->bound_dev_if != dif)) continue; diff -rc2P linux-2.4.18ctx-8/net/socket.c linux-2.4.18ctx-9/net/socket.c *** linux-2.4.18ctx-8/net/socket.c Tue Feb 26 22:31:23 2002 --- linux-2.4.18ctx-9/net/socket.c Mon Mar 18 12:13:03 2002 *************** *** 1765,1769 **** } ! asmlinkage int sys_set_ipv4root (unsigned long ip) { int ret = -EPERM; --- 1765,1769 ---- } ! asmlinkage int sys_set_ipv4root (unsigned long ip, unsigned long bcast) { int ret = -EPERM; *************** *** 1772,1775 **** --- 1772,1776 ---- ret = 0; current->ipv4root = ip; + current->ipv4root_bcast = bcast; } return ret;