FreeBSD Bugzilla – Attachment 19478 Details for
Bug 34591
ICMP bandwidth limiting does not indicate interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch (text/plain), 4.12 KB, created by
Eric Hodel
on 2002-02-03 20:30:01 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Eric Hodel
Created:
2002-02-03 20:30:01 UTC
Size:
4.12 KB
patch
obsolete
>Index: icmp_var.h >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/icmp_var.h,v >retrieving revision 1.20 >diff -c -r1.20 icmp_var.h >*** icmp_var.h 2001/12/14 19:30:42 1.20 >--- icmp_var.h 2002/02/03 20:01:59 >*************** >*** 78,84 **** > > #ifdef _KERNEL > SYSCTL_DECL(_net_inet_icmp); >! extern int badport_bandlim __P((int)); > #define BANDLIM_UNLIMITED -1 > #define BANDLIM_ICMP_UNREACH 0 > #define BANDLIM_ICMP_ECHO 1 >--- 78,84 ---- > > #ifdef _KERNEL > SYSCTL_DECL(_net_inet_icmp); >! extern int badport_bandlim __P((int, const char *, short)); > #define BANDLIM_UNLIMITED -1 > #define BANDLIM_ICMP_UNREACH 0 > #define BANDLIM_ICMP_ECHO 1 >Index: ip_icmp.c >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/ip_icmp.c,v >retrieving revision 1.66 >diff -c -r1.66 ip_icmp.c >*** ip_icmp.c 2002/01/11 12:13:57 1.66 >--- ip_icmp.c 2002/02/03 20:02:00 >*************** >*** 437,443 **** > break; > } > icp->icmp_type = ICMP_ECHOREPLY; >! if (badport_bandlim(BANDLIM_ICMP_ECHO) < 0) > goto freeit; > else > goto reflect; >--- 437,445 ---- > break; > } > icp->icmp_type = ICMP_ECHOREPLY; >! if (badport_bandlim(BANDLIM_ICMP_ECHO, >! m->m_pkthdr.rcvif->if_name, >! m->m_pkthdr.rcvif->if_unit) < 0) > goto freeit; > else > goto reflect; >*************** >*** 455,461 **** > icp->icmp_type = ICMP_TSTAMPREPLY; > icp->icmp_rtime = iptime(); > icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */ >! if (badport_bandlim(BANDLIM_ICMP_TSTAMP) < 0) > goto freeit; > else > goto reflect; >--- 457,465 ---- > icp->icmp_type = ICMP_TSTAMPREPLY; > icp->icmp_rtime = iptime(); > icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */ >! if (badport_bandlim(BANDLIM_ICMP_TSTAMP, >! m->m_pkthdr.rcvif->if_name, >! m->m_pkthdr.rcvif->if_unit) < 1) > goto freeit; > else > goto reflect; >*************** >*** 821,827 **** > */ > > int >! badport_bandlim(int which) > { > static int lticks[BANDLIM_MAX + 1]; > static int lpackets[BANDLIM_MAX + 1]; >--- 825,831 ---- > */ > > int >! badport_bandlim(int which, const char *if_name, short if_unit) > { > static int lticks[BANDLIM_MAX + 1]; > static int lpackets[BANDLIM_MAX + 1]; >*************** >*** 849,858 **** > > if ((unsigned int)dticks > hz) { > if (lpackets[which] > icmplim && icmplim_output) { >! printf("%s from %d to %d packets per second\n", > bandlimittype[which], > lpackets[which], >! icmplim > ); > } > lticks[which] = ticks; >--- 853,864 ---- > > if ((unsigned int)dticks > hz) { > if (lpackets[which] > icmplim && icmplim_output) { >! printf("%s from %d to %d packets per second on %s%d\n", > bandlimittype[which], > lpackets[which], >! icmplim, >! if_name, >! if_unit > ); > } > lticks[which] = ticks; >Index: tcp_input.c >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v >retrieving revision 1.146 >diff -c -r1.146 tcp_input.c >*** tcp_input.c 2002/01/04 17:21:27 1.146 >--- tcp_input.c 2002/02/03 20:02:05 >*************** >*** 2178,2184 **** > /* > * Perform bandwidth limiting. > */ >! if (badport_bandlim(rstreason) < 0) > goto drop; > > #ifdef TCPDEBUG >--- 2178,2186 ---- > /* > * Perform bandwidth limiting. > */ >! if (badport_bandlim(rstreason, >! m->m_pkthdr.rcvif->if_name, >! m->m_pkthdr.rcvif->if_unit) < 0) > goto drop; > > #ifdef TCPDEBUG >Index: udp_usrreq.c >=================================================================== >RCS file: /home/ncvs/src/sys/netinet/udp_usrreq.c,v >retrieving revision 1.100 >diff -c -r1.100 udp_usrreq.c >*** udp_usrreq.c 2001/11/08 02:13:17 1.100 >--- udp_usrreq.c 2002/02/03 20:02:07 >*************** >*** 358,364 **** > udpstat.udps_noportbcast++; > goto bad; > } >! if (badport_bandlim(BANDLIM_ICMP_UNREACH) < 0) > goto bad; > if (blackhole) > goto bad; >--- 358,366 ---- > udpstat.udps_noportbcast++; > goto bad; > } >! if (badport_bandlim(BANDLIM_ICMP_UNREACH, >! m->m_pkthdr.rcvif->if_name, >! m->m_pkthdr.rcvif->if_unit) < 0) > goto bad; > if (blackhole) > goto bad;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34591
: 19478