Hi guys,<div><br></div><div>I think there's an endianness problem in ospf_lsupd_receive. On the lines where the program checks lsa->type or uses the LSA_SCOPE macro, it has not previously converted lsa->type to host representation. I saw this problem as I created a new LSA class with type BFF0, which has area scope. It was incorrectly displaying "<WARN> Received LSA with invalid scope" messages and refusing to add the LSAs to the database. I checked and at the line 513, <font face="'courier new', monospace">if ((LSA_SCOPE(lsa) == LSA_SCOPE_RES)) </font><font face="arial, helvetica, sans-serif">was evaluating as true because lsa->type was F0BF, which is a reserved type. All the other LSA types are also inverted, but it doesn't pose a problem for the common LSA types as their first hex digit is usually 0 if they are misrepresented (0800 for link LSA, 0120 for router LSA etc).</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">The problem can be fixed by putting </font><font face="'courier new', monospace">ntohlsah(lsa, &lsatmp); </font><font face="arial, helvetica, sans-serif">before the checks and using </font><font face="'courier new', monospace">&lsatmp</font><font face="arial, helvetica, sans-serif"> instead of </font><font face="'courier new', monospace">lsa</font><font face="arial, helvetica, sans-serif"> for checks.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Cheers</font></div>