osmo-ggsn[master]: lib/ippool: Fix listsize calculated 1 elem too small

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Oct 15 16:03:55 UTC 2017

Patch Set 1:

(1 comment)

File lib/ippool.c:

Line 218: 		dynsize = (1 << (addr.len*8 - addrprefixlen));
I always thought the "-1" is for the GGSN itself.  So if you have a /24 with 256 addresses, one of the addresses is for the GGSN itself.  Then you may also want to exclude the network, gateway and/or broadcast addresses in addition.

However, the existing code would have mandated the GGSN to use the highest address within the pool to work.  All of those assumptions are bad anyway.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I95c24bc690490155bec9e3933d678e4668d7745f
Gerrit-PatchSet: 1
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-HasComments: Yes

More information about the gerrit-log mailing list