]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r310501:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 7 Jan 2017 09:09:54 +0000 (09:09 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 7 Jan 2017 09:09:54 +0000 (09:09 +0000)
commit9b787d1bc25f2536d07d835ca17daf28e8f384cd
treecc669f68bb717720365f14e6bbfc78ce5f089270
parent64f163d83dbd670aae4fbb817fd080943139987d
MFC r310501:

Be more strict about IpAddress type in snmp_value_parse(..)

- Use inet_pton with AF_INET instead of doing longhand with sscanf.
- Use gethostbyname2 with AF_INET to ensure that the hostname isn't
  accidentally parsed with another address family, e.g. AF_INET6.

NB: IpAddress per RFC-2578 is IPv4 only. Work is in progress to add
    the InetAddress type and friends documented in RFC-4001 and
    elsewhere (which supports IPv4, IPv6, and more).

git-svn-id: svn://svn.freebsd.org/base/stable/10@311603 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/bsnmp/lib/snmp.c