FreeBSD Bugzilla – Attachment 194065 Details for
Bug 227313
net/isboot-kmod works with net/istgt but not with ctld(8)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Let isboot-kmod working with ctld(8)
isboot-kmod-0.2.13_2.diff (text/plain), 6.23 KB, created by
Maurizio
on 2018-06-07 12:52:34 UTC
(
hide
)
Description:
Let isboot-kmod working with ctld(8)
Filename:
MIME Type:
Creator:
Maurizio
Created:
2018-06-07 12:52:34 UTC
Size:
6.23 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 465705) >+++ Makefile (working copy) >@@ -2,7 +2,7 @@ > > PORTNAME= isboot-kmod > PORTVERSION= 0.2.13 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= net > MASTER_SITES= http://www.peach.ne.jp/archives/isboot/ > DISTNAME= isboot-${PORTVERSION} >Index: files/patch-Makefile >=================================================================== >--- files/patch-Makefile (nonexistent) >+++ files/patch-Makefile (working copy) >@@ -0,0 +1,10 @@ >+--- Makefile.orig 2015-09-24 04:33:04 UTC >++++ Makefile >+@@ -6,6 +6,7 @@ KMOD= isboot >+ SRCS= isboot.c ibft.c iscsi.c >+ SRCS+= isboot.h ibft.h iscsi_compat.h >+ SRCS+= opt_cam.h >++SRCS+= device_if.h bus_if.h >+ #CFLAGS+= -DVIMAGE >+ #CFLAGS+= -DIBFT_VERBOSE >+ #CFLAGS+= -DDEBUG > >Property changes on: files/patch-Makefile >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-isboot.c >=================================================================== >--- files/patch-isboot.c (revision 465705) >+++ files/patch-isboot.c (working copy) >@@ -1,6 +1,14 @@ > --- isboot.c.orig 2015-11-05 16:50:51 UTC > +++ isboot.c >-@@ -347,9 +347,9 @@ isboot_set_v4gw(struct sockaddr_in *gate >+@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); >+ >+ #include <sys/param.h> >+ #include <sys/kernel.h> >++#include <sys/proc.h> >+ #include <sys/module.h> >+ #include <sys/endian.h> >+ #include <sys/systm.h> >+@@ -347,9 +348,9 @@ isboot_set_v4gw(struct sockaddr_in *gateway) > netmask.sin_addr.s_addr = htonl(0); > > /* delete gateway if exists */ >@@ -12,7 +20,7 @@ > if (error) { > if (error != ESRCH) { > printf("rtrequest RTM_DELETE error %d\n", >-@@ -359,9 +359,9 @@ isboot_set_v4gw(struct sockaddr_in *gate >+@@ -359,9 +360,9 @@ isboot_set_v4gw(struct sockaddr_in *gateway) > } > > /* set new default gateway */ >@@ -24,7 +32,7 @@ > if (error) { > printf("rtrequest RTM_ADD error %d\n", error); > return (error); >-@@ -391,9 +391,9 @@ isboot_set_v6gw(struct sockaddr_in6 *gat >+@@ -391,9 +392,9 @@ isboot_set_v6gw(struct sockaddr_in6 *gateway) > memset(&netmask.sin6_addr, 0, 16); > > /* delete gateway if exists */ >@@ -36,7 +44,7 @@ > if (error) { > if (error != ESRCH) { > printf("rtrequest RTM_DELETE error %d\n", >-@@ -403,9 +403,9 @@ isboot_set_v6gw(struct sockaddr_in6 *gat >+@@ -403,9 +404,9 @@ isboot_set_v6gw(struct sockaddr_in6 *gateway) > } > > /* set new default gateway */ >@@ -48,3 +56,46 @@ > if (error) { > printf("rtrequest RTM_ADD error %d\n", error); > return (error); >+@@ -416,29 +417,36 @@ isboot_set_v6gw(struct sockaddr_in6 *gateway) >+ static int >+ isboot_ifup(struct ifnet *ifp) >+ { >++ struct socket *so; >+ struct ifreq ifr; >+ struct thread *td; >+ int error; >+ >+- memset(&ifr, 0, sizeof(ifr)); >+ td = curthread; >++ error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td); >++ if (error) { >++ printf("%s: socreate, error=%d\n", __func__, error); >++ return (error); >++ } >+ >+ /* boot NIC */ >++ memset(&ifr, 0, sizeof(ifr)); >+ strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); >+ >+ /* set IFF_UP */ >+- error = ifioctl(NULL, SIOCGIFFLAGS, (caddr_t)&ifr, td); >++ error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)&ifr, td); >+ if (error) { >+- printf("ifioctl SIOCGIFFLAGS\n"); >++ printf("%s: ifioctl SIOCGIFFLAGS, error=%d\n", __func__, error); >+ return (error); >+ } >++ >+ ifr.ifr_flags |= IFF_UP; >+- error = ifioctl(NULL, SIOCSIFFLAGS, (caddr_t)&ifr, td); >++ error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)&ifr, td); >+ if (error) { >+- printf("ifioctl SIOCSIFFLAGS\n"); >++ printf("%s, ifioctl SIOCSIFFLAGS, error=%d\n", __func__, error); >+ return (error); >+ } >+- >++ soclose(so); >+ return (0); >+ } >+ >Index: files/patch-iscsi.c >=================================================================== >--- files/patch-iscsi.c (nonexistent) >+++ files/patch-iscsi.c (working copy) >@@ -0,0 +1,70 @@ >+--- iscsi.c.orig 2015-11-05 16:50:51 UTC >++++ iscsi.c >+@@ -1070,26 +1070,25 @@ isboot_append_param(pdu_t *pp, char *format, ...) >+ return (n); >+ } >+ >+- >+-#if __FreeBSD_version >= 1100000 >++#if __FreeBSD_version >= 1200051 >+ static void >++isboot_free_mbufext(struct mbuf *m) >++{ >++ void *p = m->m_ext.ext_arg1; >++#elif __FreeBSD_version >= 1100000 >++static void >+ isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) >++{ >+ #elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 >+ static int >+ isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) >++{ >+ #else >+ static void >+ isboot_free_mbufext(void *p, void *optarg) >+-#endif >+ { >+- >+- ISBOOT_TRACE("isboot_free_mbufext\n"); >+- if (p == NULL) >+-#if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 >+- return (EXT_FREE_OK); >+-#else >+- return; >+ #endif >++ ISBOOT_TRACE("isboot_free_mbufext\n"); >+ isboot_free_mext(p); >+ #if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 >+ return (EXT_FREE_OK); >+@@ -1224,7 +1223,8 @@ isboot_recv_pdu(struct isboot_sess *sess, pdu_t *pp) >+ return (error); >+ } >+ if (uio.uio_resid != 0) { >+- ISBOOT_ERROR("soreceive BHS is not complete\n"); >++ ISBOOT_ERROR("soreceive BHS is not complete, remaining " >++ "byte(s)=%d\n", (int) uio.uio_resid); >+ return (EIO); >+ } >+ m_copydata(mp, 0, ISCSI_BHS_LEN, (caddr_t)&pp->ipdu.bhs); >+@@ -1737,7 +1737,8 @@ isboot_do_login(struct isboot_sess *sess) >+ { >+ pdu_t pdu, *pp; >+ uint8_t *req; >+- int I_bit; >++ // SOLO PR0VA >++ static int I_bit = 1; >+ int T_bit, C_bit; >+ int CSG, NSG; >+ int error; >+@@ -1770,7 +1771,10 @@ next_loginpdu: >+ req = (uint8_t *)&pdu.ipdu.bhs; >+ memset(req, 0, ISCSI_BHS_LEN); >+ req[0] = ISCSI_OP_LOGIN_REQ; >+- I_bit = 1; >++ // SOLO PROVA >++ I_bit ^= 1; >++ ISBOOT_ERROR("*********************** I_bit = %d\n", I_bit); >++ // FSP >+ T_bit = C_bit = 0; >+ CSG = NSG = 0; >+ BDADD8(&req[0], I_bit, 7); > >Property changes on: files/patch-iscsi.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227313
: 194065 |
196934