]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r310501:
authorngie <ngie@FreeBSD.org>
Sat, 7 Jan 2017 09:07:12 +0000 (09:07 +0000)
committerngie <ngie@FreeBSD.org>
Sat, 7 Jan 2017 09:07:12 +0000 (09:07 +0000)
commit63d0e2cbf19d0378d9bfa690de563871bff1af91
treee5255b0181ed25f0fe2c580e288a60ff043950f9
parentded84474f288d9c251b6eff870889cb4aebda4db
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).
contrib/bsnmp/lib/snmp.c