net/isboot-kmod: fix build on 11-current

Commit r293886 removed rtrequest() from sys/net/route.c in 11-CURRENT.
This update patches isboot.c to call rtrequest_fib() instead. I
have already sent the patch to the isboot maintainer, so hopefully
this is only needed until the next point release.

This allows the port to build on 11-CURRENT as well as 10.x.

PR:		209024
Submitted by:	John Nielsen <john@jnielsen.net> (maintainer)
This commit is contained in:
Kurt Jaeger 2016-05-06 14:34:57 +00:00
parent 3ba8c251ba
commit 1f2da4d299
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=414706
2 changed files with 51 additions and 0 deletions

View file

@ -2,6 +2,7 @@
PORTNAME= isboot-kmod PORTNAME= isboot-kmod
PORTVERSION= 0.2.13 PORTVERSION= 0.2.13
PORTREVISION= 1
CATEGORIES= net CATEGORIES= net
MASTER_SITES= http://www.peach.ne.jp/archives/isboot/ MASTER_SITES= http://www.peach.ne.jp/archives/isboot/
DISTNAME= isboot-${PORTVERSION} DISTNAME= isboot-${PORTVERSION}

View file

@ -0,0 +1,50 @@
--- isboot.c.orig 2015-11-05 16:50:51 UTC
+++ isboot.c
@@ -347,9 +347,9 @@ isboot_set_v4gw(struct sockaddr_in *gate
netmask.sin_addr.s_addr = htonl(0);
/* delete gateway if exists */
- error = rtrequest(RTM_DELETE, (struct sockaddr *)&dst,
+ error = rtrequest_fib(RTM_DELETE, (struct sockaddr *)&dst,
(struct sockaddr *)gateway, (struct sockaddr *)&netmask,
- 0, NULL);
+ 0, NULL, RT_DEFAULT_FIB);
if (error) {
if (error != ESRCH) {
printf("rtrequest RTM_DELETE error %d\n",
@@ -359,9 +359,9 @@ isboot_set_v4gw(struct sockaddr_in *gate
}
/* set new default gateway */
- error = rtrequest(RTM_ADD, (struct sockaddr *)&dst,
+ error = rtrequest_fib(RTM_ADD, (struct sockaddr *)&dst,
(struct sockaddr *)gateway, (struct sockaddr *)&netmask,
- RTF_GATEWAY | RTF_STATIC, NULL);
+ RTF_GATEWAY | RTF_STATIC, NULL, RT_DEFAULT_FIB);
if (error) {
printf("rtrequest RTM_ADD error %d\n", error);
return (error);
@@ -391,9 +391,9 @@ isboot_set_v6gw(struct sockaddr_in6 *gat
memset(&netmask.sin6_addr, 0, 16);
/* delete gateway if exists */
- error = rtrequest(RTM_DELETE, (struct sockaddr *)&dst,
+ error = rtrequest_fib(RTM_DELETE, (struct sockaddr *)&dst,
(struct sockaddr *)gateway, (struct sockaddr *)&netmask,
- 0, NULL);
+ 0, NULL, RT_DEFAULT_FIB);
if (error) {
if (error != ESRCH) {
printf("rtrequest RTM_DELETE error %d\n",
@@ -403,9 +403,9 @@ isboot_set_v6gw(struct sockaddr_in6 *gat
}
/* set new default gateway */
- error = rtrequest(RTM_ADD, (struct sockaddr *)&dst,
+ error = rtrequest_fib(RTM_ADD, (struct sockaddr *)&dst,
(struct sockaddr *)gateway, (struct sockaddr *)&netmask,
- RTF_GATEWAY | RTF_STATIC, NULL);
+ RTF_GATEWAY | RTF_STATIC, NULL, RT_DEFAULT_FIB);
if (error) {
printf("rtrequest RTM_ADD error %d\n", error);
return (error);