diff options
author | Luiz Otavio O Souza <luiz@netgate.com> | 2015-09-15 12:28:35 -0500 |
---|---|---|
committer | Luiz Otavio O Souza <luiz@netgate.com> | 2015-10-20 11:22:48 -0500 |
commit | 7353719223942a91cc891d735e5c7a494f7a2244 (patch) | |
tree | c5033445000ce34e2ca1a3394eb7f9e589cceb75 /sys/kern/uipc_sockbuf.c | |
parent | 1ee9a1ce0e84cdf487da06e392aaf36e818fc1b1 (diff) | |
download | FreeBSD-src-7353719223942a91cc891d735e5c7a494f7a2244.zip FreeBSD-src-7353719223942a91cc891d735e5c7a494f7a2244.tar.gz |
Revert IPSEC patches.
Revert "Importing pfSense patch ipsec-oneshot-dump.diff"
This reverts commit d3b775b3db2819bebcac765dca33db7f8f5143c7.
TAG: IPSEC-HEAD
Issue: #4841
Diffstat (limited to 'sys/kern/uipc_sockbuf.c')
-rw-r--r-- | sys/kern/uipc_sockbuf.c | 75 |
1 files changed, 2 insertions, 73 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index d4f965a..0c67347 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -439,18 +439,15 @@ sblastmbufchk(struct sockbuf *sb, const char *file, int line) } #endif /* SOCKBUF_DEBUG */ -#define SBLINKRECORDCHAIN(sb, m0, mlast) do { \ +#define SBLINKRECORD(sb, m0) do { \ SOCKBUF_LOCK_ASSERT(sb); \ if ((sb)->sb_lastrecord != NULL) \ (sb)->sb_lastrecord->m_nextpkt = (m0); \ else \ (sb)->sb_mb = (m0); \ - (sb)->sb_lastrecord = (mlast); \ + (sb)->sb_lastrecord = (m0); \ } while (/*CONSTCOND*/0) -#define SBLINKRECORD(sb, m0) \ - SBLINKRECORDCHAIN(sb, m0, m0) - /* * Append mbuf chain m to the last record in the socket buffer sb. The * additional space associated the mbuf chain is recorded in sb. Empty mbufs @@ -719,74 +716,6 @@ sbappendaddr(struct sockbuf *sb, const struct sockaddr *asa, } int -sbappendaddrchain_locked(sb, asa, m0) - struct sockbuf *sb; - const struct sockaddr *asa; - struct mbuf *m0; -{ - struct mbuf *m, *n, *n0, *nlast, *np; - - SOCKBUF_LOCK_ASSERT(sb); - -#if MSIZE <= 256 - if (asa->sa_len > MLEN) - return (0); -#endif - - n0 = np = nlast = NULL; - for (m = m0; m; m = m->m_nextpkt) { - MGET(n, M_DONTWAIT, MT_SONAME); - if (n == NULL) - goto outofmem; - n->m_len = asa->sa_len; - bcopy(asa, mtod(n, caddr_t), asa->sa_len); - n->m_next = m; - - if (n0 == NULL) - n0 = n; - else - nlast->m_nextpkt = n; - nlast = n; - - for (np = n; np->m_next; np = np->m_next) - sballoc(sb, np); - sballoc(sb, np); - } - - SBLINKRECORDCHAIN(sb, n0, nlast); - - sb->sb_mbtail = np; - SBLASTMBUFCHK(sb); - - SBLASTRECORDCHK(sb); - return (1); - -outofmem: - while ((n = n0) != NULL) { - for (np = n; np; np = np->m_next) - sbfree(sb, np); - - n0 = n->m_nextpkt; - m_free(n); - } - return (0); -} - -int -sbappendaddrchain(sb, asa, m0) - struct sockbuf *sb; - const struct sockaddr *asa; - struct mbuf *m0; -{ - int retval; - - SOCKBUF_LOCK(sb); - retval = sbappendaddrchain_locked(sb, asa, m0); - SOCKBUF_UNLOCK(sb); - return (retval); -} - -int sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control) { |