Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154303744
D17065.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
894 B
Referenced Files
None
Subscribers
None
D17065.id.diff
View Options
Index: head/sys/netinet/in_pcb.c
===================================================================
--- head/sys/netinet/in_pcb.c
+++ head/sys/netinet/in_pcb.c
@@ -301,13 +301,14 @@
static int
in_pcbinslbgrouphash(struct inpcb *inp)
{
+ const static struct timeval interval = { 60, 0 };
+ static struct timeval lastprint;
struct inpcbinfo *pcbinfo;
struct inpcblbgrouphead *hdr;
struct inpcblbgroup *grp;
uint16_t hashmask, lport;
uint32_t group_index;
struct ucred *cred;
- static int limit_logged = 0;
pcbinfo = inp->inp_pcbinfo;
@@ -364,11 +365,9 @@
return (ENOBUFS);
} else if (grp->il_inpcnt == grp->il_inpsiz) {
if (grp->il_inpsiz >= INPCBLBGROUP_SIZMAX) {
- if (!limit_logged) {
- limit_logged = 1;
+ if (ratecheck(&lastprint, &interval))
printf("lb group port %d, limit reached\n",
ntohs(grp->il_lport));
- }
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 5:29 PM (4 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32295142
Default Alt Text
D17065.id.diff (894 B)
Attached To
Mode
D17065: Use ratecheck(9) in in_pcbinslbgrouphash().
Attached
Detach File
Event Timeline
Log In to Comment