- uses: actions/checkout@v2
- name: Configure
- run: ./configure --prefix=/usr
+ run: ./configure
- name: Build
run: make
git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build
cd build
[ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}")
- echo "configure"
- ./configure --prefix=/usr
- echo "building"
+ ./configure
make
- name: Tests
git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build
cd build
[ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}")
- echo "configure"
- ./configure --prefix=/usr
- echo "building"
+ ./configure
make
- name: Tests
make tests
netbsd:
+ strategy:
+ matrix:
+ args:
+ -
+ - --disable-ipv4
+ - --disable-arp
+ - --disable-ipv4ll
+ - --disable-ipv6
+ - --disable-dhcp6
+ cppflags:
+ -
+ - -DSMALL
runs-on: ubuntu-latest
steps:
- name: Bootstrap NetBSD-latest
git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build
cd build
[ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}")
- echo "configure"
- ./configure --prefix=/usr
- echo "building"
+ CFLAGS=-Werror CPPFLAGS="${{ matrix.cppflags }}" ./configure ${{ matrix.args }}
make
- name: Tests
ssize_t s;
struct in_addr addr, addr2;
in_addr_t *naddr;
- struct rt *rt;
const struct dhcp_opt *d, *od;
uint8_t *request, *require, *no, *reject;
struct dhcp_opt **dop, *ndop;
size_t *dop_len, dl, odl;
- struct vivco *vivco;
- const struct vivco *vivco_endp = ifo->vivco + ifo->vivco_len;
struct group *grp;
#ifdef AUTH
struct token *token;
#ifdef _REENTRANT
struct group grpbuf;
#endif
+#ifdef INET
+ struct rt *rt;
+#endif
#ifdef DHCP6
- size_t sl;
struct if_ia *ia;
uint8_t iaid[4];
+#endif
+#if defined(DHCP6) || ((defined(INET) || defined(INET6)) && !defined(SMALL))
+ size_t sl;
+#endif
#ifndef SMALL
- struct in6_addr in6addr;
+#ifdef DHCP6
struct if_sla *sla, *slap;
+#endif
+ struct vivco *vivco;
+ const struct vivco *vivco_endp = ifo->vivco + ifo->vivco_len;
+ struct in6_addr in6addr;
struct vsio **vsiop = NULL, *vsio;
size_t *vsio_lenp = NULL, opt_max, opt_header;
struct vsio_so *vsio_so;
-#endif
#endif
dop = NULL;
strncmp(arg, "ms_classless_static_routes=",
strlen("ms_classless_static_routes=")) == 0)
{
+#ifdef INET
struct in_addr addr3;
if (p == NULL) {
sa_in_init(&rt->rt_gateway, &addr3);
if (rt_proto_add_ctx(&ifo->routes, rt, ctx))
add_environ(&ifo->config, arg, 0);
+#else
+ logerrx("no inet support for option: %s", arg);
+ return -1;
+#endif
} else if (strncmp(arg, "routers=", strlen("routers=")) == 0) {
+#ifdef INET
if (p == NULL) {
rt_headclear(&ifo->routes, AF_INET);
add_environ(&ifo->config, arg, 1);
sa_in_init(&rt->rt_gateway, &addr);
if (rt_proto_add_ctx(&ifo->routes, rt, ctx))
add_environ(&ifo->config, arg, 0);
+#else
+ logerrx("no inet support for option: %s", arg);
+ return -1;
+#endif
} else if (strncmp(arg, "interface_mtu=",
strlen("interface_mtu=")) == 0 ||
strncmp(arg, "mtu=", strlen("mtu=")) == 0)
return -1;
}
} else if (strncmp(arg, "ip6_address=", strlen("ip6_address=")) == 0) {
+#ifdef INET6
if (p == NULL) {
memset(&ifo->req_addr6, 0,
sizeof(ifo->req_addr6));
sizeof(ifo->req_addr6));
return -1;
}
+#else
+ logerrx("no inet6 support for option: %s", arg);
+ return -1;
+#endif
} else
add_environ(&ifo->config, arg, p == NULL ? 1 : 0);
break;
struct rt *rt;
#endif
struct dhcp_opt *opt;
- struct vivco *vo;
#ifdef AUTH
struct token *token;
#endif
#ifndef SMALL
+ struct vivco *vo;
struct vsio *vsio;
struct vsio_so *vsio_so;
#endif