cipso_ipv4.c (0fdc50dfab47d525b71a9f0d8310746cdc0c09c5) cipso_ipv4.c (eead1c2ea2509fd754c6da893a94f0e69e83ebe4)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * CIPSO - Commercial IP Security Option
4 *
5 * This is an implementation of the CIPSO 2.2 protocol as specified in
6 * draft-ietf-cipso-ipsecurity-01.txt with additional tag types as found in
7 * FIPS-188. While CIPSO never became a full IETF RFC standard many vendors
8 * have chosen to adopt the protocol and over the years it has become a

--- 1244 unchanged lines hidden (view full) ---

1253 &tag[4],
1254 tag_len - 4,
1255 secattr);
1256 if (ret_val != 0) {
1257 netlbl_catmap_free(secattr->attr.mls.cat);
1258 return ret_val;
1259 }
1260
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * CIPSO - Commercial IP Security Option
4 *
5 * This is an implementation of the CIPSO 2.2 protocol as specified in
6 * draft-ietf-cipso-ipsecurity-01.txt with additional tag types as found in
7 * FIPS-188. While CIPSO never became a full IETF RFC standard many vendors
8 * have chosen to adopt the protocol and over the years it has become a

--- 1244 unchanged lines hidden (view full) ---

1253 &tag[4],
1254 tag_len - 4,
1255 secattr);
1256 if (ret_val != 0) {
1257 netlbl_catmap_free(secattr->attr.mls.cat);
1258 return ret_val;
1259 }
1260
1261 secattr->flags |= NETLBL_SECATTR_MLS_CAT;
1261 if (secattr->attr.mls.cat)
1262 secattr->flags |= NETLBL_SECATTR_MLS_CAT;
1262 }
1263
1264 return 0;
1265}
1266
1267/**
1268 * cipso_v4_gentag_enum - Generate a CIPSO enumerated tag (type #2)
1269 * @doi_def: the DOI definition

--- 164 unchanged lines hidden (view full) ---

1434 &tag[4],
1435 tag_len - 4,
1436 secattr);
1437 if (ret_val != 0) {
1438 netlbl_catmap_free(secattr->attr.mls.cat);
1439 return ret_val;
1440 }
1441
1263 }
1264
1265 return 0;
1266}
1267
1268/**
1269 * cipso_v4_gentag_enum - Generate a CIPSO enumerated tag (type #2)
1270 * @doi_def: the DOI definition

--- 164 unchanged lines hidden (view full) ---

1435 &tag[4],
1436 tag_len - 4,
1437 secattr);
1438 if (ret_val != 0) {
1439 netlbl_catmap_free(secattr->attr.mls.cat);
1440 return ret_val;
1441 }
1442
1442 secattr->flags |= NETLBL_SECATTR_MLS_CAT;
1443 if (secattr->attr.mls.cat)
1444 secattr->flags |= NETLBL_SECATTR_MLS_CAT;
1443 }
1444
1445 return 0;
1446}
1447
1448/**
1449 * cipso_v4_gentag_loc - Generate a CIPSO local tag (non-standard)
1450 * @doi_def: the DOI definition

--- 848 unchanged lines hidden ---
1445 }
1446
1447 return 0;
1448}
1449
1450/**
1451 * cipso_v4_gentag_loc - Generate a CIPSO local tag (non-standard)
1452 * @doi_def: the DOI definition

--- 848 unchanged lines hidden ---