I am currently working on a issue where tNetTask goes into an infinite
loop. On investiagting on this I came to observe that the code was
going into an infinite loop in sbappendaddr. Basically the setup I
have, I am pumping in UDP packets to the CPU. which finally hits the
sbappendaddr() code. the code is looping in the following for loop.

if (n)
n->m_next = m0; /* concatenate data to
control */
control = m0;
m->m_next = control;
for (n = m; n; n = n->m_next) {
sballoc(sb, n); <---- it is looping
here in this for loop.

Now, the problem I see is that m and m->m_next are pointing to the
same thing memory location causing a infinite loop. Could someone
suggest the proper working of the sbappendaddr(),

I am relatively new to this domain and any suggestion would be