search for: ipproto_udp

Displaying 20 results from an estimated 49 matches for "ipproto_udp".

2010 Feb 23
0
[PATCH 2/3] nfsmount: s/PF_INET/AF_INET/
...unt.c @@ -290,9 +290,9 @@ int nfs_mount(const char *pathname, const char *hostname, mounted = 1; if (data->flags & NFS_MOUNT_TCP) { - sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); } else { - sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); + sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); } if (sock == -1) { diff --git a/usr/kinit/nfsmount/sunrpc.c b/usr/kinit/nfsmount/sunrpc.c index 6607cf7..6fb81a1 100644 --- a/usr/kinit/nfsmount/sunrpc.c +++ b/usr/kinit/nfsmount/sunrpc.c @@ -152,7 +152,7 @@ struct client *tcp_client(uint...
2009 Mar 12
1
the return value of packet_peek()
...e (or more times), since my TP-LINK TL-R402M router will give an icmp(ping) packet before DHCPOFFER, the ipconfig will fail after it receive the packet and tries unpack teh packet in packet_recv() since we have a packet form checking there: if (ntohs(ip->tot_len) > ret || ip->protocol != IPPROTO_UDP) goto free_pkt; ip config will fall in a loop and always got the icmp packet instead of DHCPOFFER packet in this situation. If I change the retrun value of packet_peek and make a packet form checking in more early stage, I can avoiding ipconfig fall in a loop with icmp packet, like this: ---...
2004 Jan 06
1
[PATCH] possible bug in bindresvport
...=inet_addr("192.168.1.2")}, 16) = 0 write(3, "\200\0\0<\34\312\254t\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0"..., 60) = 60 read(3, "\200\0\0\34\34\312\254t\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3 getpid() = 2050 bind(3, {sa_family=AF_INET, sin_port=htons(958), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(32916), sin_addr=inet_addr("192.168.1.2")}, 16) = 0 write(3, "\377\235&\256\0\0\0\0...
2007 Feb 12
1
playing with SO_BROADCAST on centos
...dr_in broadcast_address; bzero((char *) &broadcast_address, sizeof(broadcast_address)); broadcast_address.sin_family = AF_INET; broadcast_address.sin_port = htons(NMP_PORT); broadcast_address.sin_addr.s_addr = inet_addr("255.255.255.255"); socket_handle = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if(socket_handle >= 0) { int byes = 1; fd_set read_set; struct timeval tm; if(setsockopt(socket_handle, SOL_SOCKET, SO_BROADCAST, &byes, sizeof(byes)) >= 0) { if(bind(socket_handle, (struct sockaddr *) &broadcast_address, sizeof(broadcast_address)) < 0) { printf...
2017 Jan 29
2
[PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...8,7 @@ set_sock_addr(char *host,union sock_addr *s, char **name) memset(&hints, 0, sizeof(hints)); hints.ai_family = s->sa.sa_family; - hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG; + hints.ai_flags = ai_flags; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; err = getaddrinfo(strip_address(host), NULL, &hints, &addrResult); diff --git a/common/tftpsubs.h b/common/tftpsubs.h index b3a3bf3c95e1..0edda03a514c 100644 --- a/common/tftpsubs.h +++ b/common/tftpsubs.h @@ -98,7 +98,7 @@ static inline int sa_set_port(union sock_addr *s, u_short por...
2006 Jan 17
0
asterisk.ctl limitations
...* remend = NULL; +SAU * unixsock = NULL; HINF ** gates = NULL; /* LSRR hop hostpoop */ char * optbuf = NULL; /* LSRR or sockopts */ char * bigbuf_in; /* data buffers */ @@ -660,10 +666,17 @@ /* grab a socket; set opts */ newskt: - if (o_udpmode) - nnetfd = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP); - else - nnetfd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (unixsock_name) { + if (o_udpmode) + nnetfd = socket (AF_LOCAL, SOCK_DGRAM, 0); + else + nnetfd = socket (AF_LOCAL, SOCK_STREAM, 0); + } else { + if (o_udpmode) + nnetfd = socket (AF_INET, SOCK_DGRAM,...
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...b->ip_summed == CHECKSUM_PARTIAL && + skb_headlen(skb) >= skb_transport_offset(skb) + + sizeof(struct udphdr) && + udp_hdr(skb)->dest == htons(68) && + skb_network_header_len(skb) >= sizeof(struct iphdr) && + ip_hdr(skb)->protocol == IPPROTO_UDP && + skb->protocol == htons(ETH_P_IP)) { + skb_checksum_help(skb); + /* Restore ip_summed value: tun passes it to user. */ + skb->ip_summed = CHECKSUM_PARTIAL; + } + release_sock(sk); + return 1; +} + /* Expects to be always run from workqueue - which acts as * read-size cri...
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...b->ip_summed == CHECKSUM_PARTIAL && + skb_headlen(skb) >= skb_transport_offset(skb) + + sizeof(struct udphdr) && + udp_hdr(skb)->dest == htons(68) && + skb_network_header_len(skb) >= sizeof(struct iphdr) && + ip_hdr(skb)->protocol == IPPROTO_UDP && + skb->protocol == htons(ETH_P_IP)) { + skb_checksum_help(skb); + /* Restore ip_summed value: tun passes it to user. */ + skb->ip_summed = CHECKSUM_PARTIAL; + } + release_sock(sk); + return 1; +} + /* Expects to be always run from workqueue - which acts as * read-size cri...
2009 Apr 22
0
networking problems in kinit
...d by 'do_ipconfig' with a static configuration from the kernel cmdline: ip=192.168.1.100:192.168.1.200:192.168.1.254:255.255.255.0::eth0: I added the following (simplified) code somewhere after 'do_ipconfig': ... int fd; struct sockaddr_in addr; ... fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); bindresvport(fd, 0); memset( &addr, 0, sizeof( addr ) ); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr( "192.168.1.1" ); addr.sin_port = htons( 60000 ); connect(fd, (struct sockaddr *)&addr, sizeof(addr)) send( fd, ... some data ... ) ... But now 'connect&...
2013 Dec 03
0
[PATCH] nfsmount: memset uses sizeof pointer as length
...F_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { perror("socket"); @@ -194,7 +194,7 @@ struct client *udp_client(uint32_t server, uint16_t port, uint32_t flags) goto bail; } - memset(clnt, 0, sizeof(clnt)); + memset(clnt, 0, sizeof(*clnt)); if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { perror("socket"); -- 1.8.3.2
2013 Dec 03
0
[klibc:master] nfsmount: memset uses sizeof pointer as length
...F_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { perror("socket"); @@ -194,7 +194,7 @@ struct client *udp_client(uint32_t server, uint16_t port, uint32_t flags) goto bail; } - memset(clnt, 0, sizeof(clnt)); + memset(clnt, 0, sizeof(*clnt)); if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { perror("socket");
2007 Apr 25
0
problem with prio qdisc and tcng
...rong in my configuration This ist a sample configuration and looks like this: #include "fields.tc" #include "ports.tc" #define X16(i) i i i i i i i i i i i i i i i i dev ppp0 { dsmark { prio(bands 6, priomap X16($be)) { class if ip_proto == IPPROTO_UDP; class if tcp_dport == PORT_TELNET; class if tcp_dport == PORT_HTTP; class if tcp_dport == PORT_SMTP; class if ip_dst == 10.0.10.10; $be = class(6); } } } The tc-Code looks like this: # ================================ Device ppp0 ===...
2007 Sep 14
1
[Bug 1288] ssh-add on Cygwin -- can't access ssh-agent socket
...socket (704) enabled its nonblocking mode socket (704) connecting synchronously without blocking [name=127.0.0.1:2436] socket (704) could not connect - WSAEWOULDBLOCK (A non-blocking socket operation could not be completed immediately) socket (676) created [family=AF_INET, type=SOCK_DGRAM, protocol=IPPROTO_UDP, dwFlags=WSA_FLAG_OVERLAPPED] socket (676) bound [name=127.0.0.1] socket (676) determined its local name [name=127.0.0.1:2442] socket (676) sending a datagram synchronously [len=1, to=127.0.0.1:2442] socket (676) sent a datagram that is 1 bytes 0000 00...
2017 Feb 02
0
Bug#771441: [PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...on sock_addr *s, char **name) > > memset(&hints, 0, sizeof(hints)); > hints.ai_family = s->sa.sa_family; > - hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG; > + hints.ai_flags = ai_flags; > hints.ai_socktype = SOCK_DGRAM; > hints.ai_protocol = IPPROTO_UDP; > err = getaddrinfo(strip_address(host), NULL, &hints, &addrResult); > diff --git a/common/tftpsubs.h b/common/tftpsubs.h > index b3a3bf3c95e1..0edda03a514c 100644 > --- a/common/tftpsubs.h > +++ b/common/tftpsubs.h > @@ -98,7 +98,7 @@ static inline int sa_set_port(u...
2004 Feb 26
1
ESFQ Modification
...v6hdr *iph = skb->nh.ipv6h; h = iph->daddr.s6_addr32[3]; hs = iph->saddr.s6_addr32[3]; + nfm = skb->nfmark; h2 = hs^iph->nexthdr; if (iph->nexthdr == IPPROTO_TCP || iph->nexthdr == IPPROTO_UDP || @@ -148,6 +151,7 @@ h = (u32)(unsigned long)skb->dst; hs = (u32)(unsigned long)skb->sk; h2 = hs^skb->protocol; + nfm = skb->nfmark; } switch(q->hash_kind) { @@ -157,6 +161,8 @@ re...
2009 Dec 17
4
NIS failover
We just updated our configuratiosn to have multiple NIS servers, when we initiated a test of client failover, we were disapointed. It seemed that the only way to get a filaover was to /etc/init.d/ypbind restart. It behaves as indicated in http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=5084845 using ypbind-1.17.2-13 on Centos 4.5 / Linux xxxxxxxxxxxx 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov
2005 Oct 14
5
[PATCH] Fix NAT for domU checksum offload
...port %u ", + ntohs(range->min.udp.port)); + else + return sprintf(buffer, "ports %u-%u ", + ntohs(range->min.udp.port), + ntohs(range->max.udp.port)); + } + else return 0; +} + +struct ip_nat_protocol ip_nat_protocol_udp += { "UDP", IPPROTO_UDP, + udp_manip_pkt, + udp_in_range, + udp_unique_tuple, + udp_print, + udp_print_range +}; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2006 Jun 26
0
[klibc 14/43] Remove in-kernel nfsroot code
...FS3_VERSION; - mountd_ver = NFS_MNT3_VERSION; - nfsd_port = NFS_PORT; - mountd_port = NFS_MNT_PORT; - } else { - nfsd_ver = NFS2_VERSION; - mountd_ver = NFS_MNT_VERSION; - nfsd_port = NFS_PORT; - mountd_port = NFS_MNT_PORT; - } - - proto = (nfs_data.flags & NFS_MOUNT_TCP) ? IPPROTO_TCP : IPPROTO_UDP; - - if (nfs_port < 0) { - if ((port = root_nfs_getport(NFS_PROGRAM, nfsd_ver, proto)) < 0) { - printk(KERN_ERR "Root-NFS: Unable to get nfsd port " - "number from server, using default\n"); - port = nfsd_port; - } - nfs_port = port; - dprintk("Root-NFS: P...
2016 Oct 05
3
Dev: new option to mark all tincd socket of a tincd process
I know i'm new to the list but i'd like to propose something for tincd daemon. I'd like to mark all sockets established by a tincd process with a mark passed as an argument in the command line. What could be the purpose of this new option? The goal of this option is to be able to have several tincd process running at the same time using the same port but using different ip. In
1999 Jul 30
0
Linux 2.2.10 ipchains Advisory (fwd)
...f (offset == 0) { unsigned int size_req; switch (ip->protocol) { case IPPROTO_TCP: /* Don't care about things past flags word */ size_req = 16; break; case IPPROTO_UDP: case IPPROTO_ICMP: size_req = 8; break; default: size_req = 0; } offset = (ntohs(ip->tot_len) < (ip->ihl<<2)+size_req); } As mentioned ab...