From: Weiping Pan <hidden> Date: 2011-12-01 11:46:27
After reset ipv4_devconf->data[IPV4_DEVCONF_ACCEPT_LOCAL] to 0,
we should flash route cache, or it will continue receive packets with local
source address, which should be dropped.
Signed-off-by: Weiping Pan <redacted>
---
net/ipv4/devinet.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
@@ -1490,7 +1490,9 @@ static int devinet_conf_proc(ctl_table *ctl, int write,void__user*buffer,size_t*lenp,loff_t*ppos){+intold_value=*(int*)ctl->data;intret=proc_dointvec(ctl,write,buffer,lenp,ppos);+intnew_value=*(int*)ctl->data;if(write){structipv4_devconf*cnf=ctl->extra1;
@@ -1501,6 +1503,9 @@ static int devinet_conf_proc(ctl_table *ctl, int write,if(cnf==net->ipv4.devconf_dflt)devinet_copy_dflt_conf(net,i);+if((i==IPV4_DEVCONF_ACCEPT_LOCAL-1))+if((new_value==0)&&(old_value!=0))+rt_cache_flush(net,0);}returnret;
From: Weiping Pan <hidden> Date: 2011-12-02 01:45:36
After reset ipv4_devconf->data[IPV4_DEVCONF_ACCEPT_LOCAL] to 0,
we should flush route cache, or it will continue receive packets with local
source address, which should be dropped.
Signed-off-by: Weiping Pan <redacted>
---
net/ipv4/devinet.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
@@ -1490,7 +1490,9 @@ static int devinet_conf_proc(ctl_table *ctl, int write,void__user*buffer,size_t*lenp,loff_t*ppos){+intold_value=*(int*)ctl->data;intret=proc_dointvec(ctl,write,buffer,lenp,ppos);+intnew_value=*(int*)ctl->data;if(write){structipv4_devconf*cnf=ctl->extra1;
@@ -1501,6 +1503,9 @@ static int devinet_conf_proc(ctl_table *ctl, int write,if(cnf==net->ipv4.devconf_dflt)devinet_copy_dflt_conf(net,i);+if(i==IPV4_DEVCONF_ACCEPT_LOCAL-1)+if((new_value==0)&&(old_value!=0))+rt_cache_flush(net,0);}returnret;
From: David Miller <davem@davemloft.net> Date: 2011-12-02 02:49:27
From: Weiping Pan <redacted>
Date: Fri, 2 Dec 2011 09:47:06 +0800
After reset ipv4_devconf->data[IPV4_DEVCONF_ACCEPT_LOCAL] to 0,
we should flush route cache, or it will continue receive packets with local
source address, which should be dropped.
Signed-off-by: Weiping Pan <redacted>