- Add test for PKT_ALIAS_RESET_ON_ADDR_CHANGE
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
May 20 2021
- Test case for PKG_ALIAS_SAME_PORTS
- Fix case 4_udp and various issues
- Fix stupid errors (reversed length check, existing nat state)
May 19 2021
- Factor out common utilities
- Zeroize packet buffer
I'm far from finished with this.
But thank you @kp for the intermediate, positive response.
- Simplify structure
- More simplification.
- Add UDP and reverse translation
- Fix packet header size calculation
May 18 2021
- Add UDP and reverse translation
- More simplification.
- Simplify structure
dn_aqm_pie.c and dn_sched_fq_pie.c would considerably improve by replacing the t = DROP by goto drop.
May 17 2021
- Fix spelling
- Fix build process
- Add to global build.
- Move location of test dir and update build procedure
In D30307#680794, @kp wrote:I think you're also missing a makefile hookup somewhere. These tests may want to live in /usr/src/tests/sys/netinet/libalias instead, but I don't hold strong views on that.
- Renumber the test cases and rename the file according to scope
- Replace preprocessor constants by compiler generated values.
- Use OBJDIR
- Make random reproducable.
- Inspect kyua reports
Added @lev primary for testing of functionality.
There should be some performance improvements due to:
- some early breaks in the loops with many active flows
- separation of "complete" flows from configured "forwardings"
- use of NO_ADDR when possible
Added @lev for his offer to do performance tests.
- Make the tests work directly on the intermediate builds.
- Add a test for a known API violation.
- Test to create many instances and remove them in random order.
- Add test to recreate an instance multiple time.
- Fix meta data. => Now it works.
Ah, kyua report shows:
aliasdb_test:__test_cases_list__ -> broken: Unknown test case metadata property 'desc' [0.001s]
- Remove unnecessary static
- Simplify the test
May 16 2021
Start as simple as possible and fail ...
[/usr/tests/sys/netinet/libalias]$ kyua list aliasdb_test:__test_cases_list__
- Reclassify SCTP links when specifying missing parts.
- Further refactoring
In D30284#680337, @kp wrote:In D30284#680334, @donner wrote:k -> 6, i -> 1, to -> 2 => (p)fkkif(to)kif => 0xf661f261f
I think I prefer 0xFEEDC0DE, because it's more obviously human-generated and not a valid pointer.
- NO_ADDR for fragments
- Factor out common search pattens in in and out direction.
In D30284#680331, @kp wrote:Although using a more-or-less unique combination would probably make it easier to figure out where it came from. On the third hand, pf_kkif_to_kif() is a pretty obvious place to look.
0xdeadc0de is used to signal a use after free.
Please consider a different code, which does not cause confusion in the future.
- Fix split point.
- NO_ADDR for fragments
May 15 2021
In D30273#680148, @markj wrote:In D30273#680142, @donner wrote:In D30273#680113, @markj wrote:checksum_ipv4() and checksum_ipv6() may fail without freeing the mbuf. In that case, with the patch the mbuf is leaked.
Can you point to a code line, where this can happen?
I didn't see one.In checksum_ipv4() we call PULLUP_CHECK() on line 316. PULLUP_CHECK() looks like this:
293 #define PULLUP_CHECK(mbuf, length) do { \ 294 pullup_len += length; \ 295 if (((mbuf)->m_pkthdr.len < pullup_len) || \ 296 (pullup_len > MHLEN)) { \ 297 return (EINVAL); \ 298 } \ 299 if ((mbuf)->m_len < pullup_len && \ 300 (((mbuf) = m_pullup((mbuf), pullup_len)) == NULL)) { \ 301 return (ENOBUFS); \ 302 } \ 303 } while (0)On line 297, we return an error without having freed the mbuf. On line 301 we return an error having freed the mbuf, and the caller of checksum_ipv4() will free the mbuf again. So in the first case, we are now not freeing the mbuf at all.
In D30273#680113, @markj wrote:checksum_ipv4() and checksum_ipv6() may fail without freeing the mbuf. In that case, with the patch the mbuf is leaked.
In D30275#680105, @kp wrote:struct libalias is exposed to userspace, right?
- Reestablish ABI without providing any functionality.
- Remove the last piece from the internal structure.
May 14 2021
I do not take every hint from D30260.
Many of those compiler generated suggestions destroy the flow of reading.
Most of the others are a bit picky on the line length, but this is not reason to change existing code.
Thank you for the input.
- Incooperate style suggestions from D30260
- Canonify #ifdef spacing.
- Replace spaces with tabs
- Remove spaces before tabs.
- Fix balanced braces around "else".
- Fix some spacing.
Thank you for the cool idea! There are some interesting ideas which are worth to be applied.
Rebased to D30259
- Make it const.
- Silence warning about non-static declaration.