Displaying 20 results from an estimated 69 matches for "iph".
Did you mean:
ip
2004 Feb 26
1
ESFQ Modification
...004-02-26 09:27:54.000000000 +0100
+++ ./patched/sch_esfq.c 2004-01-07 21:39:24.000000000 +0100
@@ -117,6 +117,7 @@
{
u32 h, h2;
u32 hs;
+ u32 nfm;
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
@@ -124,6 +125,7 @@
struct iphdr *iph = skb->nh.iph;
h = iph->daddr;
hs = iph->saddr;
+ nfm = skb -> nfmark;
h2 = hs^iph->protocol;
if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
(iph->protocol == IP...
2003 Aug 02
1
[SECURITY] Netfilter Security Advisory: NAT Remote DOS (SACK mangle)
...if sack found and adjuste=
d */
-static inline int
+/* TCP SACK sequence number adjustment. */
+static inline void
ip_nat_sack_adjust(struct sk_buff *skb,
- struct ip_conntrack *ct,
- enum ip_conntrack_info ctinfo)
+ struct ip_conntrack *ct,
+ enum ip_conntrack_info ctinfo)
{
- struct iphdr *iph;
struct tcphdr *tcph;
- unsigned char *ptr;
- int length, dir, sack_adjusted =3D 0;
+ unsigned char *ptr, *optend;
+ unsigned int dir;
=20
- iph =3D skb->nh.iph;
- tcph =3D (void *)iph + iph->ihl*4;
- length =3D (tcph->doff*4)-sizeof(struct tcphdr);
+ tcph =3D (void *)skb->nh.i...
2008 Sep 12
4
Custom build kernel patch fails big time.
...>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>
+#include <net/inet_ecn.h>
#include <net/ip.h>
#include <net/xfrm.h>
@@ -23,6 +24,15 @@
EXPORT_SYMBOL(xfrm4_rcv);
+static inline void ipip_ecn_decapsulate(struct sk_buff *skb)
+{
+ struct iphdr *outer_iph = skb->nh.iph;
+ struct iphdr *inner_iph = skb->h.ipiph;
+
+ if (INET_ECN_is_ce(outer_iph->tos))
+ IP_ECN_set_ce(inner_iph);
+}
+
static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi,
u32 *seq)
{
switch (nexthdr) {
@@ -103,11 +113,11 @@...
2005 Oct 15
5
esfq ? or wrr ?
Hi
If I have a HTB class with 128kbit, and I want to
put "N" users in that class ( in order to share
bandwidth fairly ) ,
which is better for me ? esfq (hash dst) or wrr ?
I would attach esfq or wrr to HTB parent class.
Also I''ve readed on Jim script that over WRR put
a RED qdisc, but I don''t understand it.
bests
andres
2013 Nov 28
4
[PATCH net] xen-netback: fix fragment detection in checksum setup
...-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 919b650..eea7ff2 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1165,15 +1165,27 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb,
struct iphdr *iph = (void *)skb->data;
unsigned int header_size;
unsigned int off;
+ bool fragment;
int err = -EPROTO;
+ fragment = false;
+
off = sizeof(struct iphdr);
header_size = skb->network_header + off + MAX_IPOPTLEN;
maybe_pull_tail(skb, header_size);
+ if (ntohs(iph->frag_o...
2011 Mar 28
5
[PATCH 1/3] Only peek and discard packets from specified device.
...it.
+ * Fetches a bootp packet from specified device, but doesn't remove it.
* Returns:
* 0 = Error
* >0 = A packet of size "ret" is available for interface ifindex
*/
-int packet_peek(int *ifindex)
+int packet_peek(struct netdev *dev)
{
struct sockaddr_ll sll;
struct iphdr iph;
int ret, sllen = sizeof(struct sockaddr_ll);
+ sll.sll_ifindex = dev->ifindex;
/*
* Peek at the IP header.
*/
@@ -192,21 +193,22 @@ int packet_peek(int *ifindex)
if (iph.ihl < 5 || iph.version != IPVERSION)
goto discard_pkt;
- *ifindex = sll.sll_ifindex;
return r...
2004 Apr 02
0
MGCP and IPH-90
Hi
::: i have an MGCP voip phone (IPH-90), but i couldn't get it work with
asterisk.
::: i'm using asterisk 0.7.2 on openbsd 3.4
the config file and the debug infos are here:
http://nostromo.jol.hu/asterisk/
so not to flood the mailing list.
regards
wiking
2005 Oct 14
5
[PATCH] Fix NAT for domU checksum offload
...ntohs(range->max.tcp.port) - min + 1;
+ }
+
+ for (i = 0; i < range_size; i++, port++) {
+ *portptr = htons(min + port % range_size);
+ if (!ip_nat_used_tuple(tuple, conntrack)) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int
+tcp_manip_pkt(struct sk_buff **pskb,
+ unsigned int iphdroff,
+ const struct ip_conntrack_tuple *tuple,
+ enum ip_nat_manip_type maniptype)
+{
+ struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff);
+ struct tcphdr *hdr;
+ unsigned int hdroff = iphdroff + iph->ihl*4;
+ u32 oldip, newip;
+ u16 *portptr, newport, oldport;
+ int...
1997 Nov 14
0
Linux IP fragment overlap bug (fwd)
...opy WAY too data (such is the
case if fp->len is < 0).
To see when this happens, we need to look at how Linux adds IP datagrams
to the reassembly queue. From ip_fragment.c@502:
/*
* Determine the position of this fragment.
*/
end = offset + ntohs(iph->tot_len) - ihl;
Ok. That''s nice. Now we have to look at what happens when we have
overlaping fragments... From ip_fragment.c@531:
/*
* We found where to put this one.
* Check for overlap with preceding fragment, and, if needed,
*...
2007 Feb 07
1
Singular Gradient
I tried to fit data with the following function:
fit<-nls(y~ Is*(1-exp(-l*x))+Iph,start=list(Is=-2e-5,l=2.3,Iph=-0.3
),control=list(maxiter=500,minFactor=1/10000,tol=10e-05),trace=TRUE)
But I get only a singular Gradient warning...
the data can by found attached(there are two sampels of data col 1/2 and
3/4).
I tried to fix it by chanching the start parameters but that didn'...
2009 Mar 12
1
the return value of packet_peek()
...n more early stage, I can avoiding ipconfig fall in a loop
with icmp packet, like this:
--- /work/atcs/os_pkg/klibc-git/klibc/usr/kinit/ipconfig.old/packet.c 2009-03-11
15:30:45.000000000 +0800
+++ packet.c 2009-03-11 17:39:56.000000000 +0800
@@ -176,6 +176,8 @@
*/
ret = recvfrom(pkt_fd, &iph, sizeof(struct iphdr),
MSG_PEEK, (struct sockaddr *)&sll, &sllen);
+
+
if (ret == -1)
return -1;
@@ -184,6 +186,10 @@
if (iph.ihl < 5 || iph.version != IPVERSION)
goto discard_pkt;
+
+ if (iph.protocol != IPPROTO_UDP)
+ goto discard_pkt;
+
*ifindex = sl...
2011 Mar 27
4
ipconfig problem if multiple devices are up
Hi,
it seems that ipconfig has a problem if multiple devices are up and
connected to the same network. It seems that it uses the wrong
socket/device index to compare it to incoming packet. To be more
precise, the packet gets discarded in do_pkt_recv as the ifindex from
state differs always from the incoming packet
To reproduce create two tap devices:
$ sudo tunctl -u uli -t tap0
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...rintf("\n bytes %d\n", len);
- return sendmsg(pkt_fd, &msg, 0);
+ return sendmsg(dev->pkt_fd, &msg, 0);
}
void packet_discard(struct netdev *dev)
@@ -174,7 +181,7 @@ void packet_discard(struct netdev *dev)
sll.sll_ifindex = dev->ifindex;
- recvfrom(pkt_fd, &iph, sizeof(iph), 0,
+ recvfrom(dev->pkt_fd, &iph, sizeof(iph), 0,
(struct sockaddr *)&sll, &sllen);
}
@@ -207,7 +214,7 @@ int packet_recv(struct netdev *dev, struct iovec *iov, int iov_len)
msg.msg_name = &sll;
msg.msg_namelen = sllen;
- ret = recvfrom(pkt_fd, &iph,...
2006 Jul 06
12
kernel BUG at net/core/dev.c:1133!
Looks like the GSO is involved?
I got this while running Dom0 only (no guests), with a
BOINC/Rosetta@home application running on all 4 cores.
changeset: 10649:8e55c5c11475
Build: x86_32p (pae).
------------[ cut here ]------------
kernel BUG at net/core/dev.c:1133!
invalid opcode: 0000 [#1]
SMP
CPU: 0
EIP: 0061:[<c04dceb0>] Not tainted VLI
EFLAGS: 00210297 (2.6.16.13-xen
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...rintf("\n bytes %d\n", len);
- return sendmsg(pkt_fd, &msg, 0);
+ return sendmsg(dev->pkt_fd, &msg, 0);
}
void packet_discard(struct netdev *dev)
@@ -174,7 +181,7 @@ void packet_discard(struct netdev *dev)
sll.sll_ifindex = dev->ifindex;
- recvfrom(pkt_fd, &iph, sizeof(iph), 0,
+ recvfrom(dev->pkt_fd, &iph, sizeof(iph), 0,
(struct sockaddr *)&sll, &sllen);
}
@@ -207,7 +214,7 @@ int packet_recv(struct netdev *dev, struct iovec *iov, int iov_len)
msg.msg_name = &sll;
msg.msg_namelen = sllen;
- ret = recvfrom(pkt_fd, &iph,...
2005 Jan 04
11
ESFQ?
Hi again,
I was just looking around for ESFQ sources, and I see that the main site
is down, and only has kernel 2.6.4 patches.
Is ESFQ maintained? If so, where can I find patches for 2.6.10?
Thanks,
-justin
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
2002 Jun 08
2
New qdisc path, try it (what is the problem)
hello,
this is my new qdisc patch, when i recompile the
kernel with this patch i dn''nt succeed please look at
it and if there are any mistakes plesease send me a
mail
thanks in advance
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
2006 Feb 22
0
Re: [PATCH] Fix IPSec for Xen checksum offload packets (Jon Mason)
...checksumming.
>- */
>+int xen_checksum_setup(struct sk_buff *skb)
>+{
> if (skb->proto_csum_blank) {
>+ skb->proto_csum_blank = 0;
> if (skb->protocol != htons(ETH_P_IP))
>- goto out_kfree_skb;
>+ goto out;
> skb->h.raw = (unsigned char *)skb->nh.iph + 4*skb->nh.iph->ihl;
> if (skb->h.raw >= skb->tail)
>- goto out_kfree_skb;
>+ goto out;
> switch (skb->nh.iph->protocol) {
> case IPPROTO_TCP:
> skb->csum = offsetof(struct tcphdr, check);
>@@ -1284,18 +1224,89 @@
> skb->csum = off...
2013 Jun 28
3
[PATCH next] xen: Use more current logging styles
...;
}
@@ -910,9 +911,8 @@ static int checksum_setup(struct net_device *dev, struct sk_buff *skb)
break;
default:
if (net_ratelimit())
- printk(KERN_ERR "Attempting to checksum a non-"
- "TCP/UDP packet, dropping a protocol"
- " %d packet", iph->protocol);
+ pr_err("Attempting to checksum a non-TCP/UDP packet, dropping a protocol %d packet\n",
+ iph->protocol);
goto out;
}
@@ -1359,14 +1359,14 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
/* A grant for every tx ring slot */...
2013 Jun 28
3
[PATCH next] xen: Use more current logging styles
...;
}
@@ -910,9 +911,8 @@ static int checksum_setup(struct net_device *dev, struct sk_buff *skb)
break;
default:
if (net_ratelimit())
- printk(KERN_ERR "Attempting to checksum a non-"
- "TCP/UDP packet, dropping a protocol"
- " %d packet", iph->protocol);
+ pr_err("Attempting to checksum a non-TCP/UDP packet, dropping a protocol %d packet\n",
+ iph->protocol);
goto out;
}
@@ -1359,14 +1359,14 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
/* A grant for every tx ring slot */...