~connman-maintainers/connman/head

Viewing all changes in revision 7706.

  • Committer: Daniel Wagner
  • Author(s): Jussi Laakkonen
  • Date: 2018-08-14 05:55:03 UTC
  • Revision ID: git-v1:572c2033e304fd89ff705d2c2823bd8f594e6dbc
inet: Treat NULL and any address gateways as the same

This fixes an issue of treating an any address (IPv4 or IPv6) as gateway
address when adding routes, which causes RTF_GATEWAY flag being set and
adding of such route to fail. RTF_GATEWAY should be set only when the
address is an real IP address.

In addition, when adding a IPv6 route the return value of inet_pton() is
utilized in order to check for the address validity before enabling
RTF_GATEWAY flag.

Added a helper function (__connman_inet_is_any_addr()) to check if an
IPv4 or IPv6 address is an any address. For convenience and future use
function prototype is added to src/connman.h.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: