osmo-ggsn[master]: ippool: Implement and use blacklist instead of blindly using...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Oct 17 17:08:35 UTC 2017


Patch Set 5:

(5 comments)

https://gerrit.osmocom.org/#/c/4256/5/ggsn/ggsn.c
File ggsn/ggsn.c:

Line 168: 			free(*blacklist);
> if you talloc the memory, you also have to use talloc_free() !!
Woops sorry I changed the ones below but forgot to change these ones!


https://gerrit.osmocom.org/#/c/4256/2/lib/in46_addr.c
File lib/in46_addr.c:

Line 198: static unsigned int ipv4_netmasklen(const struct in_addr *netmask)
> the new functions should have test cases in the (newly introduced) in46a_te
AFAIR I'm using the specific ipv4/ipv6 functions on each get_ipvX_local_address(), but as there's a comment to unify those too, then I can use the unified in46_addr version and move these ones to static.

Summary:
- Add unit tests.
- Add doxygen doc.
- Move to a separate patch.
- Move to static if it fits.


Line 234: 	#undef ADDRFIELD
> let's call it in46a_netmasklen or the like?  I don't want to have a name th
I'll then move the 3 functions to {ipv4,ipv6,in46a}_netmasklen.


https://gerrit.osmocom.org/#/c/4256/2/lib/tun.c
File lib/tun.c:

Line 755:  *  \param[in] tun Target device owning the IP
> I think this is copy+paste style programming with the ipv6 function below, 
I'll create flags:
IP_TYPE_IPV4
IP_TYPE_IPV6_LINKLOCAL
IP_TYPE_IPV6_GLOBAL

then use those to check for AF_INET(6)


https://gerrit.osmocom.org/#/c/4256/2/lib/tun.h
File lib/tun.h:

Line 97: 
> the change of tun_ipv6_local_get() api with flags could be split out as sep
I'll split all changes to this function into a separate patch


-- 
To view, visit https://gerrit.osmocom.org/4256
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e91f7280d60490c858a769dd578c1c8e54e9243
Gerrit-PatchSet: 5
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list