Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157721342
D30275.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D30275.diff
View Options
diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h
--- a/sys/netinet/libalias/alias.h
+++ b/sys/netinet/libalias/alias.h
@@ -120,10 +120,12 @@
int LibAliasSaveFragment(struct libalias *, void *_ptr);
/* Miscellaneous functions. */
-int LibAliasCheckNewLink(struct libalias *);
unsigned short LibAliasInternetChecksum(struct libalias *, unsigned short *_ptr, int _nbytes);
void LibAliasSetTarget(struct libalias *, struct in_addr _target_addr);
+/* never used and never worked, to be removed in FreeBSD 14 */
+int LibAliasCheckNewLink(struct libalias *);
+
/* Transparent proxying routines. */
int LibAliasProxyRule(struct libalias *, const char *_cmd);
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -1330,7 +1330,6 @@
goto getout;
}
HouseKeeping(la);
- ClearCheckNewLink(la);
alias_addr = pip->ip_dst;
/* Defense against mangled packets */
@@ -1461,7 +1460,6 @@
goto getout;
}
HouseKeeping(la);
- ClearCheckNewLink(la);
/* Defense against mangled packets */
if (ntohs(pip->ip_len) > maxpacketsize
diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c
--- a/sys/netinet/libalias/alias_db.c
+++ b/sys/netinet/libalias/alias_db.c
@@ -1675,7 +1675,6 @@
lnk = FindLinkIn(la, ANY_ADDR, alias_addr,
0, 0, LINK_ADDR, 0);
if (lnk == NULL) {
- la->newDefaultLink = 1;
if (la->targetAddress.s_addr == INADDR_ANY)
return (alias_addr);
else if (la->targetAddress.s_addr == INADDR_NONE)
@@ -2052,13 +2051,6 @@
}
}
-void
-ClearCheckNewLink(struct libalias *la)
-{
- LIBALIAS_LOCK_ASSERT(la);
- la->newDefaultLink = 0;
-}
-
void
SetProtocolFlags(struct alias_link *lnk, int pflags)
{
@@ -2548,15 +2540,12 @@
return (res);
}
+/* never used and never worked, to be removed in FreeBSD 14 */
int
LibAliasCheckNewLink(struct libalias *la)
{
- int res;
-
- LIBALIAS_LOCK(la);
- res = la->newDefaultLink;
- LIBALIAS_UNLOCK(la);
- return (res);
+ (void)la;
+ return (0);
}
#ifndef NO_FW_PUNCH
diff --git a/sys/netinet/libalias/alias_local.h b/sys/netinet/libalias/alias_local.h
--- a/sys/netinet/libalias/alias_local.h
+++ b/sys/netinet/libalias/alias_local.h
@@ -118,9 +118,6 @@
#else
FILE *logDesc;
#endif
- /* Indicates if a new aliasing link has been created
- * after a call to PacketAliasIn/Out(). */
- int newDefaultLink;
#ifndef NO_FW_PUNCH
/* File descriptor to be able to control firewall.
@@ -323,7 +320,6 @@
void AddSeq(struct alias_link *lnk, int delta, u_int ip_hl,
u_short ip_len, u_long th_seq, u_int th_off);
void SetExpire (struct alias_link *_lnk, int _expire);
-void ClearCheckNewLink(struct libalias *la);
void SetProtocolFlags(struct alias_link *_lnk, int _pflags);
int GetProtocolFlags(struct alias_link *_lnk);
void SetDestCallId(struct alias_link *_lnk, u_int16_t _cid);
diff --git a/sys/netinet/libalias/libalias.3 b/sys/netinet/libalias/libalias.3
--- a/sys/netinet/libalias/libalias.3
+++ b/sys/netinet/libalias/libalias.3
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 1, 2020
+.Dd May 31, 2021
.Dt LIBALIAS 3
.Os
.Sh NAME
@@ -863,16 +863,6 @@
can route packets to the machine in question.
.Ed
.Pp
-.Ft int
-.Fn LibAliasCheckNewLink "struct libalias *"
-.Bd -ragged -offset indent
-This function returns a non-zero value when a new aliasing link is created.
-In circumstances where incoming traffic is being sequentially sent to
-different local servers, this function can be used to trigger when
-.Fn LibAliasSetTarget
-is called to change the default target address.
-.Ed
-.Pp
.Ft u_short
.Fn LibAliasInternetChecksum "struct libalias *" "u_short *buffer" "int nbytes"
.Bd -ragged -offset indent
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 25, 11:17 AM (19 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33499630
Default Alt Text
D30275.diff (3 KB)
Attached To
Mode
D30275: libalias: Remove unused function LibAliasCheckNewLink
Attached
Detach File
Event Timeline
Log In to Comment