Change in osmo-ggsn[master]: properly store IPv6 addresses in struct tun_t

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/.

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Thu Nov 22 12:12:23 UTC 2018


Stefan Sperling has posted comments on this change. ( https://gerrit.osmocom.org/11871 )

Change subject: properly store IPv6 addresses in struct tun_t
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11871/1/lib/tun.c
File lib/tun.c:

https://gerrit.osmocom.org/#/c/11871/1/lib/tun.c@332
PS1, Line 332: 	strncpy(snet, inet_ntoa(tun->addr.v4), sizeof(snet));
> Ah it's copying whatever inet_ntoa returns. So that's a string.
Looks ugly but is legal. inet_ntoa returns a pointer to a static memory area so we can assume it won't fail.
strncpy will only copy up to the NUL terminator and zero-fill the rest of snet.



-- 
To view, visit https://gerrit.osmocom.org/11871
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idd2431ad25d7fa182e52e2bd5231ceb04d427c34
Gerrit-Change-Number: 11871
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 22 Nov 2018 12:12:23 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181122/5541c414/attachment.htm>


More information about the gerrit-log mailing list