|
|
Re: [PATCH] net: Provide SYN packet for passive connections |
From: Eric Dumazet <eric.dumazet@xxxxxxxxx> Date: Mon, 12 Mar 2012 21:01:59 -0700 > [PATCH net-next] inet: embed icsk_accept_queue in an union > > icsk_accept_queue is currently used only for LISTEN sockets. We could > share its space with fields used for other kind of inet sockets. > > For active connections, this area is zeroed in socket setup, and for > passive ones, we clear the whole area in inet_csk_clone_lock() to make > sure we dont use content inherited from (listener) parent. > > /* Deinitialize accept_queue to trap illegal accesses. */ > memset(&newicsk->icsk_accept_queue, 0, sizeof(newicsk->icsk_accept_queue)); > > For 100% safety, we could do the same in inet_csk_listen_stop(), or we can > double check that fields added in this union later are only accessed by non > LISTEN sockets. > > All these fields must have a null default value. > > Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx> > Suggested-by: Tom Herbert <therbert@xxxxxxxxxx> We can put this in when something that makes use of the new union is added. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |